Skip to content

Instantly share code, notes, and snippets.

Created February 24, 2013 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5025436 to your computer and use it in GitHub Desktop.
Save anonymous/5025436 to your computer and use it in GitHub Desktop.
if __name__ == '__main__':
PlayAgain = True
main()
#While loop is used to check if the user wants to play again
while PlayAgain:
PlayerChoice = input("Would you like to roll again? Please enter 'Yes' or 'No': \n")
PlayerChoice = PlayerChoice.lower()
if PlayerChoice[0] == "n":
PlayAgain = False
print("Thanks for using my script!")
elif PlayerChoice[0] == "y":
main()
else:
print("Please enter a valid choice.\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment