Rental Car Cost


#1

print ("hello there")
print ("but the days that you want to put your car there")
days=input("")
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?
#2

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.


#3

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.


#4

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.


#5

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


#6

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


#7

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