Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- dobre = 0
- spatne = 0
- a = random.randint(1,10)
- b = random.randint(1,10)
- for c in 1, 2, 3, 4, 5, 7, 8, 9, 10:
- c = input("Kolik je %d x %d? " % (a, b))
- if c == a * b:
- print "Spravne!"
- dobre = dobre + 1
- else:
- print "Spatne!"
- spatne = spatne + 1
- print "Mate %d spravnych odpovedi a %d spatnych." % (dobre, spatne)
- raw_input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement