Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. from random import randint
  2.  
  3. # print("Who will guess the number?")
  4.  
  5. # The player should guess the computer's number
  6. computer_num = randint(1, 100)
  7.  
  8. print(computer_num)
  9.  
  10. print("Guess?")
  11. player_guess = input()
  12. player_guess = int(player_guess)
  13.  
  14. if computer_num < player_guess:
  15.     print("Less")
  16. elif computer_num > player_guess:
  17.     print("Greater")
  18. else:
  19.     print("You win!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement