File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ #Electronic radar
12#29- Write a program that reads the speed of a car. If it exceeded 80km/h, show a message saying that it
23# was fined. The fine will cost R$7.00 for each km above the limit.
34speed = float (input ('Enter the speed of your car:' ))
45if speed > 80 :
56 print ('FINED!!!! You have exceeded the 80Km/h limit.' )
67 fined = (speed - 80 ) * 7
7- print (f'You will need for a fine of R ${ fined } .' )
8+ print (f'You will need for a fine of U ${ fined :.2f } .' )
89print (f'Have a nice day! Drive safely!' )
10+
11+
12+ # Radar eletrônico
13+ #29: Escreva um programa que leia a velocidade de um carro. Se ele ultrapassar 80Km/h, mostre uma mensagem dizendo que
14+ # ele foi multado. A multa vai custar R$7,00 por cada Km acima do limite.
15+ velocidade = float (input ('Qual a velocidade do carro?' ))
16+ if velocidade > 80 :
17+ print (f'Você passou { velocidade - 80 } Km/h do limite e deverá pagar R${ (velocidade - 80 )* 7 :.2f} ' )
18+
19+
20+ #PT- Exercícios com uso de condicional.
21+ #EN- Exercises using conditional.
You can’t perform that action at this time.
0 commit comments