Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #Linus Hansson
  2. #Linux administration 7.5
  3.  
  4.  
  5. import random
  6. x=1
  7. z=1000
  8. guess=0
  9. number=random.randint(1,1000)
  10.  
  11.  
  12.  
  13. while guess != number and guess != "exit":
  14. guess = input ("Im thinking about a number between 1-1000")
  15.  
  16.  
  17. if guess == "exit":
  18. break
  19.  
  20. if guess < number:
  21. print ("thats to low!")
  22.  
  23. elif guess > number:
  24. print ("thats to high")
  25.  
  26. else:
  27. print ("There u go! good jobb!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement