ICTPRG302CodingHomework/movieTicket.py

17 lines
599 B
Python
Raw Permalink Normal View History

2023-09-17 06:58:56 +00:00
# Copyright 2022, Rayyan Hodges, TAFE NSW
# rayyan.hodges@studytafensw.edu.au
#Gathering user's age and the rating they wish to view.
age=int(input("Please enter your age: "))
rating=input("Please enter the rating of the movie you wish to view: ")
#Aged 12 or younger and 65 and over, therefore allowed discount on movie ticket.
if age<13 or age>64:
if rating == "g" or rating == "G":
print("You are eligible for a discounted movie ticket.")
else: print("You are NOT eligible for a discounted movie ticket")
else:
print("You are NOT eligible for a discounted movie ticket.")