Created
July 21, 2018 01:39
-
-
Save umluizlima/b702f135a3be432521053d5247e42cdf to your computer and use it in GitHub Desktop.
Tabuada_B
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
from random import randint | |
def tabuada(): | |
equacao = f'{randint(1,9)} * {randint(1,9)}' | |
print(equacao.replace('*', 'x')) | |
return int(input('Resposta: ')) == eval(equacao) | |
acertos = 0 | |
while(tabuada()): | |
acertos += 1 | |
print(f'Acertos: {acertos}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment