top of page

PROGRAMMING CHALLENGES

Lucky Draw

Difficulty:

1 Easy

2.2 Practice Exam Questions

Topic:

A school is running a lucky draw where students pick a random number between 1 and 50. Write a program that generates a random number and asks the user to guess it. If they guess correctly, output "Winner!" otherwise output "Try again."

Use random.randint() to generate the number and a while loop to keep prompting until they guess correctly.

Need help with your programming skills?

If you need more help than just independent practise, then we're here for you. Book a 1:1 with us and we will be able to guide you to becoming a proficient programmer who can tackle any of the challenges an exam board can throw at you.

bottom of page