🎯
课程 11 · 年级 P1
Project: quiz game in Python
📖 课程
──▶
🎯 测验——选择翻译
──▶
✅ 本课已完成
Your first real project — a quiz game. Logic: store questions with answers, ask the player, check answers, count score. Variables, conditions and loops now work together!
- ●questions = ["Capital of France?", "2 + 2?"]
- ●answers = ["Paris", "4"]
- ●points = 0 → for i in range(len(questions)):
- ●if guess == answers[i]: points += 1
Programmer's magic: write a SMALL version first (1 question — 1 answer), test it, then extend. Big programs are built from small bricks — even Google works this way.
💡 Task: add a level — if points == 3, print "🏆 You are champion!" Run your code on replit.com — free, no install.