File tree Expand file tree Collapse file tree 3 files changed +22
-22
lines changed Expand file tree Collapse file tree 3 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 1- # Escreva um programa que leia a velocidade de um carro. Se ele ultrapassar 80Km /h, mostre uma mensagem dizendo que ele
2- # foi multado. A multa vai custar R$7, 00 por cada Km acima do limite .
3- velocidade = float (input ('Digite a velocidade do seu carro :' ))
4- if velocidade > 80 :
5- print ('MULTADO! Você exedeu o limite permitido que é de 80km/h ' )
6- multa = (velocidade - 80 ) * 7
7- print ('Você deverá pagar uma multa de R${}.'. format ( multa ) )
8- print ('Tenha um bom dia! Dirija com segurança !' )
1+ # Write a program that reads the speed of a car. If it exceeded 80km /h, show a message saying that it
2+ # was fined. The fine will cost R$7. 00 for each km above the limit .
3+ speed = float (input ('Enter the speed of your car :' ))
4+ if speed > 80 :
5+ print ('FINED!!!! You have exceeded the 80Km/h limit. ' )
6+ fined = (speed - 80 ) * 7
7+ print (f'You will need for a fine of R${ fined } .' )
8+ print (f'Have a nice day! Drive safely !' )
Original file line number Diff line number Diff line change 1- # Crie um programa que leia um número inteiro e diga se ele é par ou ímpar .
2- num = int (input ('Me diga um número qualquer :' ))
3- resultado = num % 2
4- if resultado == 0 :
5- print ('O número {} é par.' . format ( num ) )
1+ # Create a program that reads an integer and tells you whether it is even or odd .
2+ number = int (input ('Enter a number :' ))
3+ result = number % 2
4+ if result == 0 :
5+ print (f'The number { number } its even.' )
66else :
7- print ('O número {} é impar.' . format ( num ) )
7+ print (f'The number { number } its odd.' )
Original file line number Diff line number Diff line change 1- # Desenvolva um programa que pergunte a distância de uma viagem em km. Calcule o preço da passagem, cobrando R$0, 50 por
2- # km para viagens até 200km e R$0, 45 para viagens mais longas .
3- distancia = float (input ('Qual a distância da sua viagem ?' ))
4- print ('Você está preste a começar uma viagem de { }km.'. format ( distancia ) )
5- if distancia <= 200 :
6- preço = distancia * 0.50
1+ # Develop a program that asks the distance of a trip in km. Calculate the ticket price, charging R$0. 50 per
2+ # km for trips up to 200km and R$0. 45 for longer trips .
3+ distance = float (input ('What is the distance of your travel ?' ))
4+ print (f'You wil stard a travel of { distance } km.' )
5+ if distance <= 200 :
6+ price = distance * 0.50
77else :
8- preço = distancia * 0.45
9- print ('E o preço da sua passagem será de R${:.2f }.'. format ( preço ) )
8+ price = distance * 0.45
9+ print (f'And the price of your ticket will be R${ price } .' )
You can’t perform that action at this time.
0 commit comments