Last active
October 8, 2021 21:14
-
-
Save Aadrian0/a92b040b7c788be1bdab8efc94af9128 to your computer and use it in GitHub Desktop.
Desenvolva um gerador de tabuada, capaz de gerar a tabuada de qualquer número inteiro entre 1 a 10. O usuário deve informar de qual numero ele deseja ver a tabuada. A saída deve ser conforme o exemplo abaixo:
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
tabuada = int(input("Tabuada do numero: ")) | |
for count in range(10): | |
print(f'{tabuada} x {count + 1} = {tabuada * (count + 1)}') | |
#código baseado em outro antigo sobre o mesmo exercicio: | |
#tabuada=int(input("Tabuada do numero: ")) | |
#for count in range(10): | |
#print("%d x %d = %d" % (tabuada, count+1, tabuada*(count+1)) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment