can sombody help me with this error??


None is the default returned value, so no return keyword is reached when the car is rented for a single day. How do you think the flow of your program is when the car is rented for a single day?


So what correction should I make for it to work?


you mean at the end I should add
return cost


Well, there are multiple things you can do.

that is a possibility, yes. Given no discount has to be applied. You could also use else


Thanks, it worked
i would be happy to know the alternate method if you would like to share


the alternative is to reduce cost in the if and elif clause, and then at the end of the function to return cost


Got it. Thank you so much for your help


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