The question is "Ask user to enter age, Check if age entered is > 0. if age less than 12 ticket price is 12 dollars otherwise the ticket price is 18 dollars"
def main() :
n = int(input("Insert your age : ")) #asking for users age
while True : # checking if users age is more than 0
if n > 0 :
break
return n
if price_checker(n) :
print("Price is 12 dollars")
else :
print("Price is 18 dollars")
def price_checker(x) :
if x < 12 :
return True
else :
return False
main()
When i print it the only code executed was "insert your age : " i've tried a few ways to fix it but it just lead to more confusion