+ 1
Feet to Inches Converter
Can anyone help me with this task? Need to make conversation foot to inches. 1 foot = 12 inches. I think that need use input inside function, but i do not sure...please help mb like this?: feet = int(input()) def convert(feet): feet = feet * 12 return convert print(convert(feet))
5 Answers
+ 6
return feet
+ 5
to make it a bit more clear and simple you can use it like this: đ
def convert(feet):
return feet * 12
+ 5
Lothar 's solution is the simplest. If you are going to use your function, you need to correct it like this:
def convert(feet):
inches = feet * 12
return inches
+ 3
just an enhancement: use feet *= 12
0
Thank you so much!!!