The Roast Machine

Bonus

Bonus challenges

Bonus challenges

Three extensions for when you've finished everything else.


Counter

Track how many roasts you've generated and print a total at the end.

count = 0 # inside the loop, after each roast: count += 1 # after the loop ends (after the while block): print(f"Total roasts delivered: {count}")

Third level

Add a medium option with its own lists. You'll need to extend the if/else into an if/elif/else:

if level == "savage": ... elif level == "medium": starters = medium_starters middles = medium_middles endings = medium_endings else: ...

Roast a whole squad

Ask the user to type multiple names separated by commas, split them into a list, and roast each one automatically.

names_input = input("Enter names separated by commas: ") names = names_input.split(",") for name in names: name = name.strip() # generate roast for each name
Loading Python runtime…
Try it here
Loading...
bash
$ Click "Run" to execute your code...