The Roast Machine

Step 1 of 3

Build the machine

Build the machine

You're building a Python program that takes a name and generates a random personalised roast. No fixed lines β€” every roast is assembled from list fragments.


Step 1 β€” Run it

Copy the starter code into the editor below and run it a few times before changing anything.

πŸ“¦ Variables πŸ“‹ Lists 🎲 random πŸ“₯ input()

import random name = input("Enter a name: ") starters = ["Listen up,", "Okay so,", "Not to be rude but,"] middles = ["your fashion sense", "your Roblox skills", "your taste in music"] endings = ["needs serious help.", "is actually painful to witness.", "made my eyes water."] roast = random.choice(starters) + " " + name + ", " + random.choice(middles) + " " + random.choice(endings) print(roast)

Questions to think about:

  • Why does the output change each time you run it?
  • What does random.choice() actually do?
  • What happens if you run it 10 times β€” will you ever see the exact same roast twice?

Step 2 β€” Make it yours

πŸ“‹ Lists πŸ“ Strings

Replace every string inside the three lists with your own roast lines. The code structure stays exactly the same β€” only what's inside the lists changes.

Rules:

  • At least 5 options in each list
  • Each ending needs to fit grammatically after a middle (e.g. "your vibe" + " is painful to witness.")
  • The funnier the better

Example of what finished lists might look like:

starters = ["Look,", "I'm not saying,", "Okay but,", "Honestly,", "Not to be dramatic but,"] middles = ["your haircut", "your playlist", "your Roblox avatar", "your entire vibe", "your sense of humour"] endings = ["is a cry for help.", "really didn't have to go that hard.", "made me physically cringe.", "is beyond saving.", "needs a complete reset."]
Loading Python runtime…
Try it here
Loading...
bash
$ Click "Run" to execute your code...