Skip to content

Instantly share code, notes, and snippets.

@umluizlima
Last active July 21, 2018 01:05
Show Gist options
  • Save umluizlima/c368c41f004e7f52de706fc3affb0c04 to your computer and use it in GitHub Desktop.
Save umluizlima/c368c41f004e7f52de706fc3affb0c04 to your computer and use it in GitHub Desktop.
Tabuada
def tabuada():
equacao = f'2 * 3'
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