101k views
0 votes
Write an application for a condo owner on a Florida Beach. The owner wants an application to be able to accept the season for the rental and the amount of days of the customer wishes to rent the condo. Based on each, the application will determine a final price for the rental.

User Phhu
by
5.7k points

1 Answer

3 votes

Answer:

in_season_price = 120.0

off_season_price = 70.0

price = 0

season = input("Which season you plan to rent \"IN/OFF\" season: ")

days = int(input("Enter the days you want to rent: "))

if season == "IN":

price = in_season_price * days

elif season == "OFF":

price = off_season_price * days

print("Rental price is: " + str(price))

Step-by-step explanation:

Set the prices for in and off season

Ask the user to choose the season and number of days they want to stay

Depending on the user choice calculate the price, multiply the season price with the number of days

Print the total price

User Ross McNab
by
5.5k points