1
Home
Tirsvad edited this page 2026-11-15 11:15:44 +01:00

English · Dansk · Bahasa Melayu

Higher Lower

A console game: guess which of two Instagram accounts has more followers.

What is it?

Day 14 of the Udemy course 100 Days of Code: The Complete Python Pro Bootcamp. The program shows two accounts, A and B, and asks which one has more followers. A right guess adds a point and the winner stays for the next round. A wrong guess ends the game. Each account is shown once per game, so a player who gets through all 50 wins. The follower counts (in millions) come from the assignment's data set.

What the exercise teaches

  • Comparing values and choosing between two options
  • Writing small functions with the names the assignment asks for (format_data, check_answer)
  • Keeping a score and a game loop
  • Separating pure game logic from input and output, and writing small automated tests

What it does

  • Two random, different accounts per round, shown with ASCII art
  • Answer with A or B in any case; invalid answers are asked for again
  • A point for every right guess and a message when the game ends
  • A win message when all 50 accounts have been used

Next