Pack 2 · Challenge 4 of 5 · 10 XP · ⏱ 4 min
Joke Machine
😂 Loops and prompts together: ask Pip for three jokes and number them. (Pip only knows one joke. It's a tiny model.)
for n in range(1, 3):
print("Round " + str(n))Round 1 Round 2
Instructions
- Loop
nfrom 1 to 3 withrange. - Each time, print
Joke 1:and thenpip.ask("Tell me a joke"), with the right number.
💡 Hint
for n in range(1, 4): print("Joke " + str(n) + ": " + pip.ask("Tell me a joke")).
bot.py
Terminal