Rental Car Cost


print ("hello there")
print ("but the days that you want to put your car there")
def rental_car_cost():
cost = str(days) * 40
if days >= 7:
return cost - 50
elif days >= 3:
return cost - 20

Where is the problem with this code?

Those lines should be removed. There is no call for user inputs in this exercise.

The above function should take one argument, days.

If days is 6, this will give you a string of 40 sixes.

Lastly, be sure to return the undiscounted amount at the very end of your function.


I kbow the exrsice dont tell me to do some thing here but in programming you need to test your self+ I am test my self and i got error and i got shocked
Also thank you for make it true
And thanks for all body here.


For best results, complete the exercises without deviating from the instructions. Once you pass a lesson, you are free to improvise as you like, but it would be folly to expect the lesson to be able to check it.


Yeah this is the true..
Thank you
And sorry for your lost time with me..


No need to apologize. No time is lost by me.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.