+ 1
Trying something out
I am trying to add input to this example from the Conditional Statement lesson for Python. #sets the value of age age = 22 if age >= 18: # executed only if customer is over-age print("Regular price") else: #executed only if age is less than 18 print("Discount") I replaced “22” for “input()” User gets prompted for age, but always returns an error message. It should display “Discount” if user enters a number under 18 but it always returns an error message.
2 ответов
+ 3
YES! You beautiful person! Thank you! I just needed to convert the string to an integer! LOL so, simple once you see it