Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def StartSection():
- guessed = False
- wrong_guess = 0
- while not guessed:
- guess = input("As a stone inside a tree, I'll help your words outlive thee. But if you push me as I stand, the more I move the less I am. You have three tries to guess correctly or death will be upon you\n")
- if guess == "pencil":
- guessed = True
- WinCondition()
- elif wrong_guess == 3:
- print("You died.")
- LoseCondition()
- else:
- wrong_guess += 1
- print("\nWrong guess you have guessed wrong " + str(wrong_guess) + " times")
- def WinCondition():
- print("You won good job")
- Restart()
- def LoseCondition():
- print("You've Died:(")
- Restart()
- def Restart():
- restart = input("Press g to play again. Press any other key to stop")
- if restart == "g":
- StartSection()
- else:
- print("See ya later")
- exit()
- if __name__ == '__main__':
- StartSection()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement