Last active
March 13, 2019 19:23
-
-
Save eloidrai/c1939d04538251da3917c5858677579b to your computer and use it in GitHub Desktop.
Conçu pour ma sœur, ce programme permet de se tester sur les tables de multiplication.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import random | |
x = 0 | |
print("Quelle table veux-tu reviser ?") | |
t = int(input()) | |
print ("C'est parti.") | |
for i in range(10): | |
h = int(random.randint(0,9)) | |
vr = t*h | |
r = int(input("%s * %s = " %(t, h))) | |
if (r==vr): | |
print ("Bien !") | |
x = x+1 | |
else: | |
print ("Eh non, c'était %s." %(vr)) | |
print("Ton score est de %s/10" %(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment