Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Number Guessing Game in Python!..
- #Code by GameNationRDF..
- #You can easily change the game's number range!..
- from random import uniform
- import math
- while True:
- ai_choice_raw = uniform(0, 10)
- ai_choice = math.floor(ai_choice_raw)
- print ("Pick yo number! (Between 0 and 10)")
- user_number=int(input("> "))
- if (user_number)>10:
- break
- elif (user_number)==(ai_choice):
- print ("Computer guessed it right!")
- elif (user_number)!=(ai_choice):
- print ("Guesses did not match! :(")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement