Hi,
I'm newbie to Python.
I have a question on this coding, why I cant run this code?
Can anyone guide me what's problem to this.
Thanks
I'm newbie to Python.
I have a question on this coding, why I cant run this code?
Can anyone guide me what's problem to this.
Thanks
age = input ("How old are you? ") height = input ("What is your height? (cm)") if (age > 8) and (height > 130): print ("Welcome to our Roller Coaster!") else: print ("Come again next time!")
Output:How old are you? 9
What is your height? (cm)140
Error:---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-46-0851fb80a35f> in <module>
1 age = input ("How old are you? ")
2 height = input ("What is your height? (cm)")
----> 3 if (age > 8) and (height > 130):
4 print ("Welcome to our Roller Coaster!")
5 else:
TypeError: '>' not supported between instances of 'str' and 'int'