Write a program that determines the price of a movie ticket depending on age and time.
The program have customer's age and for the time on a 24-hour clock (where noon is 1200 and 4:30PM is 1630).
The normal adult ticket price is $8.00, however the adult matinee price is $5.00. Adults are those over 13 years. The normal children's ticket price is $4.00, however the children's matinee price is $2.00. Assume that a matinee starts at any time earlier than 5pm (1700)
Answers
Answered by
0
Answer:
This program is written in python
Explanation:
A = int(input("Enter your age"))
Time = int(input("Enter the time as 1200 for noon and 1630 for evening")
Status = A + Time
Price = 0
if Status >= 1213:
Price = 8
else if Status <= 1213:
Price = 4
else if Status >= 1643:
Price = 5
else if Status <= 1643:
Price = 2
print ("The price of your ticket is "Price)
---------------------------------------------------------------
Similar questions