Skip to content

Commit 8668624

Browse files
committed
doc: add comments
Exercises with commented arithmetic operators. Car Rental.
1 parent b380300 commit 8668624

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ex015.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Car Rental.
12
#15- Write a program that asks the number of km traveled by a rented car and the number of days for which
23
# it was rented. Calculate the price to pay, knowing that the car costs R$60 per day and R$0.15 per km driven.
34
'''km = int(input(' Enter how many Km you have driven the car:'))
@@ -7,6 +8,7 @@
78
print('If you stayed {} days with the carand it ran {}Km with him, then you must pay R${}.'.format(day, km, (value_day +value_km)))'''
89

910

11+
# Aluguel de Carros.
1012
#15: Escreva um programa que pergunte a quantidade de Km percorridos por um carro alugado e a quantidade de dias pelos
1113
# quais ele foi alugado. Calcule o preço a pagar, sabendo que o carro custa R$60 por dia e R$0,15 por Km rodado.
1214
km = float(input('Quantos Km você rodou com o carro?'))

0 commit comments

Comments
 (0)