Created
August 23, 2019 03:10
-
-
Save flfelipelopes/1db52360f7ffcfbdd3176706ec1f46d8 to your computer and use it in GitHub Desktop.
A Python multi-calculation table. Under devolpment.
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
number = int(input('Você quer o cálculo de qual número?')) | |
operacao = input('Qual operação você quer fazer?') | |
fator = int(input('Você quer a operação até qual fator?')) | |
print('Aqui está a', operacao, 'do', number,', de 0 a', fator) | |
for (fator) in range(int(fator) + 1): | |
if operacao == '+': | |
operacao = '+' | |
soma = (number + fator) | |
calc = soma | |
elif operacao == 'x': | |
operacao == 'x' | |
operacao = 'x' | |
multi = (number * fator) | |
calc = multi | |
elif operacao == '-': | |
operacao == '-' | |
operacao = '-' | |
subt = (number - fator) | |
calc = subt | |
elif operacao == '/': | |
operacao == '/' | |
operacao = '/' | |
div = (fator / number) | |
calc = div | |
print(number, operacao, fator, '=', calc) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am want to implement it by telling the user that a Zero Division is not possible.