0
What's wrong with my code?
ip = input() num = int(input()) if str(ip) == 'inches': print(str(num*12)) elif str(ip) == 'feet': print(str(num/12)) Thx so much
7 Respuestas
+ 2
Try
if ip == "inches" :
and
elif ip == "feet" :
+ 2
For me it's working. Did you make the input right.?
feet [ENTER]
5 [SUBMIT]
+ 2
Ok thank you, cuz I wasn't letting me make a separate line, I would hit enter and nothing would happen
+ 1
Thx
+ 1
For some reason it is still giving me an EOF error for the second input. I don't know why.
- 1
Write a python code to this pattern ?
1
12
123
1234
12345