Skip to content

Instantly share code, notes, and snippets.

@umluizlima
Last active July 21, 2018 00:49
Show Gist options
  • Save umluizlima/3aef04c4c3dbb0f55739def480b134b4 to your computer and use it in GitHub Desktop.
Save umluizlima/3aef04c4c3dbb0f55739def480b134b4 to your computer and use it in GitHub Desktop.
Tab
from random import randint
def tabuada():
s = f"{randint(1,9)} * {randint(1,9)}"
print(s.replace('*', 'x'))
return int(input('Resposta: ')) == eval(s)
record = 0
while(tabuada()):
record += 1
print(f"Você acertou {record} vezes consecutivas!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment