Sprint 2 - Random Numbers! (Python)
Homework in Random Numbers in Python
- 📚 Homeworks & Creative Tasks (Python, Pick 1)
- ✨ Task 1: Simple Loot Box
- 🎲 Task 2: Dice Rolling Counter
- 📖 Task 3: Random Story Generator
- ⚖️ Task 4: Basic Fairness Test
📚 Homeworks & Creative Tasks (Python, Pick 1)
✨ Task 1: Simple Loot Box
Create a basic program that opens 10 loot boxes. Use a slider to change the chance of getting rare items (10% to 90%). Count how many common vs rare items you get. Display the results in a simple list.
🎲 Task 2: Dice Rolling Counter
Roll a 6-sided die 20 times. Keep track of how many times each number (1–6) appears. Show the counts in a simple chart or list. Students can see if numbers appear evenly or not.
📖 Task 3: Random Story Generator
Pick random words from simple lists (character, place, action). Example: "The [knight/wizard/dragon] went to the [castle/forest/cave] and [fought/slept/ate]". Generate 5 random stories with one button click. Show all stories in a list.
⚖️ Task 4: Basic Fairness Test
Roll a die 100 times. Count how many times each number appears. Check if each number appears around 16–17 times (100 ÷ 6 ≈ 16.67). Display results: "Fair!" if numbers are close to 16–17, "Maybe unfair?" if very different.
All tasks should use simple python with random module. No complex statistics or advanced libraries are needed.