Advertisement
Jure199

Untitled

Jan 19th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. import random
  2. a = random.randrange(100)
  3. stevec = 0
  4. while True:
  5.  
  6.  
  7.     stevilo = int(input("VInput number:"))
  8.     if stevilo < a:
  9.         print("Vaše število je manjše")
  10.         stevec += 1
  11.     elif stevilo > a:
  12.         print("Vaše Število je manjše")
  13.         stevec +=1
  14.     else:
  15.         print("Vaše število je pravilno, ugotovile ste v", stevec, "Poskusu")
  16.         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement