python - How to write a function that outputs a two-column table -
i need help creating table. question asking me write function outputs 2 column table of kilogram weights , pound equivalents kilogram values 0
, 10
, 20
..., 100
.
so far have:
kilos = eval(input("enter weight in kilograms: ")) pounds = 2.2 * kilos print("the weight in pounds is", pounds)
but have no thought how build table.
by table assume trying print output on console.
mult_factor = 2.20462 print ('kilogram', 'pound') in range (0, 100, 10): print (i , * mult_factor)
python table
No comments:
Post a Comment