-3

the cost of renting a car per day is 40 dollars. if the days you rented the car in is equal or superior to 7 you get 50 dollars off the total cost if the days you rented the car in is equal or superior to 3 you get 20 dollars off the total cost You can't get both reductions at the same time.............

days=raw_input()
cost= 40*days
if days>=7:
 cost-=50
elif days>=3 and days<7:
 cost-=20 
print(cost)

i was expecting to find the total cost ofthe car's rent .

buran
  • 13,682
  • 10
  • 36
  • 61

1 Answers1

0

I simply tried this code

days=8
cost= 40*days
if days>=7:
cost-=50
elif days>=3 and days<7:
cost-=20 
print(cost)

And other options of Days. the code is working alright

liquidot
  • 79
  • 9