Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An example of a little game you can make with minimal programming knowledge for my sister
import random
def costco_police():
print("'You can't do that' yells the Costco Police")
print("They throw you in Costco Jail for the rest of your life. There is no rotisserie chicken here.")
fail()
def fail():
print("MISSION FAILED: YOU DID NOT GET THE ROTISSERIE CHICKEN")
exit(0)
def karen_kills_you():
print("You attempt to flee")
print("'THERE IS NO ESCAAAAPE' shouts the Karen")
print("Suddenly, a piercing pain in your back")
print("You look down at your chest, Karen's fist is clutching your heart")
print("'I WANT TO SEE YOUUUR MANAGERRRR' she cries, as everything fades to black")
fail()
def battle_karen():
print("'I DEMAND YOU RELINQUISH YOUR CHICKEN, MADAM' you shout at the Karen, straight in its eyes")
print("The Karen releashes a soul shattering shriek. 'REEEEEEEEEEEEEE'")
print("The crowds around you recoil in shock as the screech pops their eardrums")
print("Luckily you had your airpods in rocking out to Kids Bob 22, and your ears are spared")
health = 10
karen_health = 10
while health > 0:
print(f"Karen: {karen_health} hp\nYou: {health} hp")
print("[A]ttack, [H]eal, or [F]lee")
action = input(":")
power = random.uniform(1, 2)
if action.lower()[0] == "a":
print(f"You attack the Karen and do {power} damage")
karen_health -= power
elif action.lower()[0] == "h":
print(f"You lick your wounds and recover {power} health")
health += power
else:
karen_kills_you()
power = random.uniform(2, 5)
print(f"Karen does {power} damage against you")
health -= power
print("Your vitality depleted, escape is your only option")
karen_kills_you()
def popcorn_death():
print("You head to the back of the store, tummy grumbling.")
print("As you walk back, you get hungrier and hungrier. Your strength of will falters as you pass")
print("the popcorn. You fill up your cart, but your hunger is still not satisfied")
print("You rip open an entire pallet of popcorn into a pile on the ground")
print("You dive into it like Scrougge McDuck")
print("Unfortunantly, it wasn't deep enough, and you break your neck as you hit the ground")
print("You are underneath the pile of popcorn, no one can see you")
print("You are paralyzed from the waist down")
attempts = 10
while attempts > 0:
attempts -= 1
print(f"You have {attempts} actions left before you starve")
print("1. Struggle towards the back of the store towards the chicken\n2. Attempt to pull your phone to get help\n")
input(":")
print("You're paralyzed, you can't do that")
print("After eating all of the popcorn near your head, eventually you run out and starve to death.")
fail()
def no_cart_death():
print("Without a shopping cart, the crowds close in tighter and tighter")
print("After struggling only a few minutes, you succumb to the press of people around you")
print("They find your body curled up underneath some patio furniture")
fail()
def go_in_store():
global has_cart
print("You enter the front of the store, prying your way between the crowds")
if not has_cart:
no_cart_death()
print("You are now in the front of the store")
print("1. Buy a hotdog\n2. Head to the back of the store")
action = input(":")
if action == "1":
print("You wisely buy a hotdog. Venturing into Costco hungry is a recipie for disaster")
else:
popcorn_death()
print("Using your cart as a battering ram, you arrive in the back of the store")
print("Just as you pull up to the rotisserie chicken place, the last chicken gets grabbed by a short middle aged fake blonde woman with poofy short hair")
print("You see some chickens on the cooker thing behind the counter")
print("1. Battle Karen for the last chicken\n2. Attempt to grab the chicken from behind the counter")
action = input(":")
if action == "1":
battle_karen()
else:
print("Before the costco employees can react, you hop behind the counter and thrust your greedy fingers on a choice chicken on the spinning rack thing")
print("Suddenly the chicken moves, and its wing grab your hand tightly")
print("Guess that one wasn't all the way dead, or cursed")
print("Crying for help, you struggle against the chicken's grip as it rotates to the back of the machine")
print("The poultry's grasp is too much. You get pulled into the machine, and wrapped around the spit")
print("'Not again' moans the Costco employee")
print("You dead.")
fail()
def go_in_store_panic():
print("You enter the store")
print("As you walk in, bodies fly apart as a froth-mouthed Karen bursts through the crowd, knocking some old ladies and orphans over")
if not has_cart:
print("With nothing to defend yourself, the Karen runs you over")
print("If you're dead, you can't eat rotisserie chicken")
fail()
print("You use your shopping cart as a battering ram and deflect the Karen to the side")
print("'NOOOOOOOOooooooo' she yells as she falls down a convenient bottomless pit and explodes at the bottom. Maybe she'll come back in a sequel with no explaination")
print("You stroll to the back of the store, there is one chicken left on the shelf")
print("Satisfied, you grab it, and stroll out the emergency exit, as ashes fall around you")
print("Oh yeah, in the panic the store got actually lit on fire")
print("'Hey, this mans a hero, he pulled the fire alarm before anyone else saw it' a nearby person cries")
print("'HERO! HERO!' the crowd begins to chant")
print("You get interviewed on the news and get famous, but during your 10 minutes of fame, your chicken gets cold")
print("Cold chicken is disgusting, so you yeet it into Utah Lake")
fail()
def pull_fire_alarm():
print("You run and pull the nearest fire alarm.")
print("Hordes of mormon soccer moms flee the store, their 6-10 children in tow")
print("In the confusion, you notice that the rear emergency exit is now open")
print("1. Go in emergency exit \n2. Go in front of store \n3. Pull the fire alarm again")
action = input(":")
if action == "1" and not has_cart:
print("You go in the back door")
no_cart_death()
elif action == "1" and has_cart:
print("You battle through the crowds running out the emergency exit using your cart as a weapon, as intended in Costco")
print("You approach the rotisserie chicken case. There is one left")
print("Suddenly, the Costco Police appear from around a corner")
print("'No one expects the Costo Inquisition!' they cry")
print("'We saw you enter in the back door!'")
costco_police()
elif action == "2":
go_in_store_panic()
elif action == "2" and has_cart:
go_in_store_panic()
else:
print("You pull the fire alarm again. The universe explodes and all existence ceases to exist")
print("If nothing exists, there is no rotisserie chicken")
fail()
has_cart = False
print("You enter the Orem Costco on a busy Saturday")
print("You know the risks, but your need for a $5 rotisserie chicken overrides logic")
print("You approach the door.")
while True:
print("1. Go in \n2. Grab a cart \n3. Pull the fire alarm")
action = input(":")
if action == "1":
go_in_store()
elif action == "2" and has_cart:
print("You attempt to grab another cart")
costco_police()
elif action == "2":
print("You sagely grab a cart. There is no such thing as just buying a couple things from Costco")
has_cart = True
continue
else:
pull_fire_alarm()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.