Year 7 practice challenges

Four longer programming challenges on variables, input, conditionals and for loops. Each challenge is on its own page. Try it yourself, then press Show solution.

Challenge 1

Pocket Money Planner

Ask for pocket money and spending, then work out what is left and how many weeks to save for a gift.

inputcasting
Open challenge 1
Challenge 2

Theme Park Ticket Checker

Use if / elif / else and and / or to decide ticket price and ride access from age and height.

conditionalsand / or
Open challenge 2
Challenge 3

Sports Day Scoreboard

Loop through race times entered by the user. Find the total, the average, and how many times beat the school record.

for loopsrunning total
Open challenge 3
Challenge 4

Locked Quiz Challenge

Check a password first. Then run a 5-question times-table quiz, score the answers, and print a grade.

passwordfor + if
Open challenge 4