๐Ÿ PyQuest๐Ÿ•ต๏ธ Game: Number Detective ยท ๐ŸŽฒ Step 1: The Secret Number
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

Step 1: The Secret Number ๐ŸŽฒ

You're building Number Detective: the computer hides a number, you hunt it down with clues, and at the end you get ranked on how good a detective you are. ๐Ÿ•ต๏ธ

Everything starts with the computer picking a number you can't predict. That's what the random module is for:

import random

roll = random.randint(1, 6)   # a random whole number from 1 to 6
print(roll)

randint(1, 6) means "pick a whole number from 1 to 6" โ€” and both ends count, so 1 and 6 can happen too.

Your mission

  1. Put import random at the very top
  2. Make a variable secret holding random.randint(1, 50)
  3. Print it โ€” for now you're allowed to spy on it! ๐Ÿ”
  4. Run your program 3 or 4 times and watch the number change

Your code

Press โ–ถ Run to see what your code does!