Step 1 of 4

Step 1 · Read and run

The ticket machine

This chapter's project is a cinema's ticket machine. The price depends on your age:

Age Price
under 12 £5.50
12 to 17 £7.00
18 to 64 £9.50
65 and over £6.00

And on Tuesdays, every ticket is £2 cheaper.

The program makes two decisions, one after the other. First an if / elif / else picks the age price. Then a separate if takes off the Tuesday discount. They're separate because the discount can apply as well as any age price.

Run it a few times with different ages and days.

Run the program to carry on.
cinema.py

Output

Press Run to see what your program prints.