How to use the projects
Each project uses skills from the starter pack. Plan first: write down what the program should do, then build it a step at a time, running it after each step.
1. Quiz master
Store questions and answers in two lists, ask each one and keep score.
questions = ["Capital of France?", "5 x 6?", "Binary for 3?"]
answers = ["paris", "30", "11"]
score = 0
for i in range(len(questions)):
reply = input(questions[i] + " ").lower()
if reply == answers[i]:
score = score + 1
print("You scored", score, "out of", len(questions))
Stretch: shuffle the questions with random.shuffle.
2. Password strength checker
Check the length and whether the password contains a number and a capital letter. Rate it weak, medium or strong.
pw = input("Password: ")
points = 0
if len(pw) >= 8: points += 1
if any(c.isdigit() for c in pw): points += 1
if any(c.isupper() for c in pw): points += 1
print(["Weak", "Weak", "Medium", "Strong"][points])
3. Higher or lower
Show a random card from 1 to 13. The player guesses if the next is higher or lower. Keep going until they are wrong, then show their streak.
4. Dice statistics
Roll two dice 1,000 times and count how often each total from 2 to 12 appears, using a list of counts. Which total is most common, and why?
5. Caesar cipher
Shift each letter of a message along the alphabet by a key to encrypt it, and back again to decrypt.
def shift(text, key):
result = ""
for ch in text.upper():
if ch.isalpha():
result += chr((ord(ch) - 65 + key) % 26 + 65)
else:
result += ch
return result
print(shift("HELLO", 3)) # KHOOR
6. High score table
Save names and scores to a text file, then read them back and show the top five in order. This is great practice for file handling questions.
with open("scores.txt", "a") as f:
f.write(name + "," + str(score) + "\n")
Skills covered
| Project | Key skills |
|---|---|
| Quiz master | Lists, loops, selection |
| Password checker | String handling, validation |
| Higher or lower | Random numbers, while loops |
| Dice statistics | Lists, counting, iteration |
| Caesar cipher | Functions, ASCII, MOD |
| High score table | File handling, sorting |

