Skip to content

Instantly share code, notes, and snippets.

@umluizlima
Created July 21, 2018 01:39
Show Gist options
  • Save umluizlima/b702f135a3be432521053d5247e42cdf to your computer and use it in GitHub Desktop.
Save umluizlima/b702f135a3be432521053d5247e42cdf to your computer and use it in GitHub Desktop.
Tabuada_B
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