Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- result=False
- score=0
- while not result:
- num=random.randrange(1000,10000)
- print(num)
- user_answer=input("guess if the above number is divisible by 13: ")
- if user_answer=="yes" and num%13==0:
- score+=1
- print("good guess, try again")
- elif user_answer=="no" and num%13!=0:
- print("good guess, try again")
- score+=1
- else:
- break
- print("your score",score)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement