Car Rental code

Post Reply
tanveerhabib
Posts: 2
Joined: Mon Mar 14, 2022 11:08 pm

Car Rental code

Post by tanveerhabib » Mon Mar 14, 2022 11:16 pm

What I am trying to do is get this function to return:

The cost of a car that is rented for 2 or less days at 40 a day.
The cost of car a car that is rented midasbuy
rent a car dubai
blue world city
zameen between 3 and 7 days with a discount of 20.
The cost of a car rented for more than 7 days with a discount of 50.

However, when I put in 35 for days instead of 1,350, I get none. And when I put in 5 for days...I get none. Ideas

Code: Select all

days = int(raw_input("How many days do you want to rent da car for?"))

def rental_car_cost(days):
     if days < 3:
         return days * 40
     if days >= 3 and days <= 7:
         return ((days * 40)-20)
     elif days > 7:
         return ((days*40) -50)


print rental_car_cost(days)

Conoetais
Posts: 6
Joined: Sun Mar 13, 2022 4:46 pm

Re: Car Rental code

Post by Conoetais » Fri Apr 01, 2022 2:12 am

I got, thank you for useful information

CharityHolt
Posts: 27
Joined: Sun Apr 17, 2022 1:52 am

Re: Car Rental code

Post by CharityHolt » Mon May 23, 2022 4:30 pm

Very interesting system of discounts for car rental, I've never encountered. All the same, I like to travel in my car, then the process brings more fun, and if you make everything in the car to your liking, then the result is even more pleasant, I always find all the novelties on ford bronco sport accessories, there are always new and relevant stuff on different cars, the blog will please every driver.
Hello. The best thing about this online casino is the direct deposit and withdrawal process. You can use payment methods such as https://casinosanalyzer.com/low-deposit ... sit-casino to make transactions at this gambling club. This will help you improve your entire experience at this site. In addition to casino games, you can also bet on sports, an interesting feature for sports fans.

aisben
Posts: 11
Joined: Thu May 26, 2022 12:12 pm

Re: Car Rental code

Post by aisben » Thu May 26, 2022 4:52 pm

I could use your information

Post Reply