daily pastebin goal
86%
SHARE
TWEET

Untitled

a guest Feb 12th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2. import json
  3. import datetime
  4. from functions import get_score_list
  5. from functions import play_game_easy
  6. from functions import play_game_hard
  7.  
  8. current_time = datetime.datetime.now()
  9. secret = random.randint(1, 5)
  10. attempts = 0
  11. name = input("Please enter your name: ")
  12. wrong_guesses = []
  13. score_list =[]
  14. while True:
  15.     choice = input("Please choose one of the following options: Press 1 to see the highscores, press 2 to play a new game, press 3 to quit: ")
  16.     if choice == "1":
  17.         get_score_list()
  18.  
  19.     if choice == "2":
  20.         difficulty = input ("Please enter the difficulty level for your game: easy or hard: ")
  21.  
  22.         if difficulty == "easy":
  23.             play_game_easy(attempts, secret, score_list, name, wrong_guesses, datetime, json)
  24.         elif difficulty == "hard":
  25.             play_game_hard(attempts, secret, score_list, name, wrong_guesses, datetime, json)
  26.     if choice == "3":
  27.         print("Thanks for playing!")
  28.         break
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top