Created
March 23, 2020 17:59
-
-
Save steffanydev/0ed06959d35171bdaffe4ea83a6b6271 to your computer and use it in GitHub Desktop.
Escreva um programa que leia a velocidade de um carro. Se ele ultrapassar 80Km/h, mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$7,00 por cada Km acima do limite.
This file contains hidden or 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
| velocidade = float(input('Informe a velocidade do carro: ')) | |
| if velocidade > 80: | |
| print('Você foi multado! O limite é de 80KM/h') | |
| # Quanto passou do limite. Multa custa R$ 7,00 por KM acima do limite | |
| multa = (velocidade - 80) * 7 | |
| print('A multa custara R${:.2f}'.format(multa)) | |
| else: | |
| print('Não ultrapasse a velocidade permitida!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment