Transportation


#1


can sombody help me with this error??


#2

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?


#3

So what correction should I make for it to work?


#4

you mean at the end I should add
return cost


#5

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


#6

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


#7

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


#8

Got it. Thank you so much for your help


#9

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