Advertisement
Felanpro

simple game

Aug 4th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. from random import *
  2.  
  3. number = randint(1, 10 + 1)
  4. tries = 1
  5.  
  6. while(True):
  7.     guess = int(input("Guess random number between 1 - 10: ")) #Convert input to integer.
  8.     if(guess is number):
  9.         print("You guesseed right, tries:", tries)
  10.     else:
  11.         pass
  12.     tries += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement