Created
December 19, 2015 15:00
-
-
Save felipecruz/59585cce444bd19ca4db to your computer and use it in GitHub Desktop.
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
# errado - identação de "if not imposto" | |
salario = int(input('Salario? ')) | |
imposto = 27. | |
while imposto > 0.: | |
imposto = input('Imposto ou (0) para sair: ') | |
if not imposto: | |
imposto = 27. | |
else: | |
imposto = float(imposto) | |
print("Valor real: {0}".format(salario - (salario * (imposto * 0.01)))) | |
# certo | |
salario = int(input('Salario? ')) | |
imposto = 27. | |
while imposto > 0.: | |
imposto = input('Imposto ou (0) para sair: ') | |
if not imposto: | |
imposto = 27. | |
else: | |
imposto = float(imposto) | |
print("Valor real: {0}".format(salario - (salario * (imposto * 0.01)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment