Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import random, os
  2. def c():os.system('cls')
  3. def p(s):print(s)
  4. n=''
  5. i=0
  6. p("Write")
  7. while True:
  8. s="Score "+str(i)
  9. m=str(random.randint(0,9))
  10. if(i!=0):p(s),p("At end add")
  11. p(m)
  12. n+=m
  13. if input()!=n:
  14. i=-1
  15. c(),p("Answer was "+n),p(s),p("Again")
  16. n=''
  17. else:c()
  18. i+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement