Header Ads Widget

Header Ads

PYTHON GAME CODE

 HERE ARE SAME PYTHON TEXT GAME CODES GUYS 

#importing packages
import webbrowser
import time
#starting the game
welcome = input("Hi, This is death game. You can play some interesting games. Would you like to play? (y/n) = ")
if welcome=='y':
print("You have chosen to play the game. Please make your way to the game hall.")
time.sleep(5)
#starting cointoss game
import time

print("Instructions: The first game is coin toss. 'h' - Heads or 't'[Tails]. A coin will be tossed. If your choice is the outcome of the coin, you will win. If your choice is different than the outcome, you lose.")
time.sleep(7)
headsortails = input("What is your choice? (h/t) = ")
if headsortails=='t':
print("You lost!")

else:
print("You win")
print("The next game will begin in a few minutes.")
print("Please move to the hallway")
#starting good choice game
print("Hi. Welcome to the choice game. You have to make a choice in order to win this round.")
whatsyourchoice=input('Would you choose to get 1 million dollars or work hard to get 10000 dollars? (one million / 10000)= ')
if whatsyourchoice=='10000':
print("You have picked the right choice. You have won this game.")
#starting wild game
print("The next game is in the wild. You will be dropped in a forest. Where you must survive one day to win this round")
print("Dropping you in the forest...")
time.sleep(3)
print("VirtualBot - Hi player. I am a VirtualBot. I will help you in this round. You must survive this one day and you must have walked at least 10 km to win this round.")
time.sleep(2)
print("Start walking..")
walkorno=input('would you walk or quit? = (walk/quit) = ')
if walkorno=='walk':
print("Good")
print("After 5 hrs...")
time.sleep(3)
print("Hi there user. You have just walked 5 km. That's good. Now find something to eat.")
fruitchoosing=input("Would you choose an apple or a worm. The worm is a special kind and very more nutritious. (worm/apple) = ")
if fruitchoosing=='worm':
print("You have done the correct choice. Worms give you good nutrition that is required by you.")
leftorright2=input("do you want to turn right or left (left/right) = ")
if leftorright2=='right':
print("Walking..")
time.sleep(3)
elif leftorright2=='left':
print("Walking..")
time.sleep(3)
shootorrun=input("There is a lion.Would you shoot or escape? (shoot/escape) = ")
if shootorrun=='shoot':
print("Bam! The lion is down!")
print("You made the right choice!")
print("You have survived the forest!")
print("You won the death game!")
webbrowser.open('https://theraghavblog.blogspot.com')
else:
print("running away!")
time.sleep(2)
print("The lion has caught you. You have been eliminated.")


else:
print("apple is ok but the worm is more nutritous.")
leftorright2=input("do you want to turn right or left (left/right) = ")
if leftorright2=='right':
print("Walking..")
time.sleep(3)
elif leftorright2=='left':
print("Walking..")
time.sleep(3)
shootorrun=input("There is a lion.Would you shoot or escape? (shoot/escape) = ")
if shootorrun=='shoot':
print("Bam! The lion is down!")
print("You made the right choice!")
print("nutrition level - 0")
print("You have been eliminated!")
else:
print("running away!")
time.sleep(2)
print("The lion has caught you. You have been eliminated.")



else:
print("You have been let free from the game.")
else:
print("You are greedy. You have been elimininated.")


else:
print("Why are you missing on an enormous cash prize? It's ok..You have just lost the chance to earn millions.")














    




Post a Comment

1 Comments

  1. You can learn the steps by visiting https://theraghavblog.blogspot.com/2021/12/death-game-project-in-python-how-to.html

    ReplyDelete