Python-monster game.py

Job ID: 35199332

Budget: $30 – $250 USD

Can you make my code runnable in python? Please do not copy online, github or stack I upoad file check that requirement
import time
import random
components =[]
rival = random.choice(["demon", "beasts", "picachu", "alien", "cybergs"])
weapons= random.choice(["blade", "dagger", "sword", "knife", "cutlass"])
def print_sleep(txt, t):
print(txt, time.sleep(t))
def print_pause(txt, t):
print(txt, time.pause(t))
def intro(components, option):
print_pause("You find yourself standing in an open field, filled with grass and", "yellow wildflowers.", 1)
print_pause("Rumor has it that a wicked fairie is somewhere around here, and has", "been terrifying the nearby village.", 1)
print_pause("In front of you is a house.", 2)
print_pause("To your right is a dark cave.", 1)
print_pause("In your hand you hold your trusty (but not very effective) dagger.", 1)
def option():
while True:
option = input("Enter 1 to knock on the door of the house.\n"
"Enter 2 to peer into the cave.\n"
"What would you like to do?\n"
"Please enter 1 or 2.\n")
if option == '1':
house()
break
elif option == '2':
cave()
break
else:
print("Please enter 1 or 2.\n")
# If the player knocks on the door of the house, what happens?
#If the player enters the cave, what happens?
def fight(components, option):
for weapon in weapons:
print_pause(f"The {rival} onslaught on you!", 2)
fight = input("Do you like to (1) play or (2) escape?\n")
if fight == '1':
if ({weapons}) in items:
print_pause(f"monster {rival} , you pull out "
f"your new {weapons}.", 2)
print_pause(f"The {weapons} of Ogoroth shines brightly in your "
"hand as you brace yourself for the attack.", 2)
print_pause(f"the {rival} takes one look at your shiny new "
"toy and runs away!", 2)
print_pause(f"Save your town from {rival}. "
"Game Winner!", 2)
continue_back()
else:
print_pause(f"You feel a bit under-prepared for this, "
"what with only having a tiny dagger.", 2)
print_pause(f"You do your best...", 2)
print_pause(f"but your dagger is mismatch {rival}.", 2)
print_pause(f"You lost the game!", 2)
print_pause(f"Game finish, goodbye", 2)
continue_back()
elif fight == '2':
print_pause("You run back into the field. Luckily, "
"you don't seem to have been followed.")
option()

if response == "knief":
print_pause("We have to fight with enemies " + dragon + " monster!")
print_pause("Get ready in 3, 2, 1.....")
knife(weapons)
else:
print_pause("We have to fight back " + rivals + " demon!")
print_pause("Be prepare for battle")
sword(weapons)
house()

def house(components, option):
print_pause("You approach the door of the house.", 1)
print_pause(f"You are about to knock when the door "
f"opens and out steps a {rival}.", 1)
print_pause(f"Eep! This is the {rival} house!", 1)
fight()
def field(components, option):
print_pause("Enter 1 to knock on the door of the house.")
print_pause("Enter 2 to peer into the cave.")
print_pause("What would you like to do?")
while True:
option1 = input("(Please enter 1 or 2.)\n")
if option1 == "1":
house(item, option)
break
elif option1 == "2":
cave(item, option)
break
def cave(components, option):
for weapon in weapons:
if ({weapons}) in items:
print_pause("You've been here before, and gotten all "
Related categories: Python Software Testing