I am new to python but why is this code not working?
Traceback (most recent call last):
File "C:/Users/bcola/Desktop/Other/python/app.py", line 41, in <module>
print(Payment)
NameError: name 'Payment' is not defined
Please help
#Parking Ticket machine Money = 50 import time print(''' ---------------------------- |Press Enter To Continue | | | | | | | | | | Made by Ben| ---------------------------- ''') input("") print(''' ---------------------------- |How Long Are you Staying? | | 1 = 1 hour £1.20 | | 2 = 2 hours £2.40 | | 3 = 3 hours £3.00 | | 4 = All Day £7.00 | | 5 = All week £14.00| ---------------------------- ''') In = input (">") if In == 1: Payment = 1.20 if In == 2: Payment = 2.40 if In == 3: Payment = 3.00 if In == 4: Payment = 7.00 if In == 5: Payment = 14.00 print(Payment) print(f"Your current statement is £{Money}")Error:
Traceback (most recent call last):
File "C:/Users/bcola/Desktop/Other/python/app.py", line 41, in <module>
print(Payment)
NameError: name 'Payment' is not defined
Please help