Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(+5) Write a Python program that provides a solution for Problem #8 in Lab 00 Re

ID: 3879339 • Letter: #

Question

(+5) Write a Python program that provides a solution for Problem #8 in Lab 00 Recall the problem read as follows:

Aaron is staying at a hotel that charges $100 per night plus tax for a room. A tax of 8% is applied to the room rate per day and an additional one-time fee of $5.00 is charged by the hotel. Which of the following represents total charge, in dollars, for staying x nights

Correct answer is b

(100 + .08*x) + 5

1.08(100*x) + 5 correct answer

1.08(100*x + 5)

1.08(100 + 5)* x

Template for your consideration

T = .08   # tax for each day
F = 5.00 # one time fee
R = 100 # room rate
d = int(input("Enter the number of days stayed at the hotel "))
c = 0 # initialize cost variable
if (d > 0):        # days > 0
    # calculations here to compute the solution
    # remember to use constants T R and F in your calculations
    # use the correct answer provided
   
print(" the cost for ", d, " days is ", c )
else:    # here m is <= 300           # s <= 0
   
print(" Invalid entry for days ", d )

Explanation / Answer

T = .08 # tax for each day
F = 5.00 # one time fee
R = 100 # room rate
d = int(input("Enter the number of days stayed at the hotel "))
c = 0 # initialize cost variable
if (d > 0): # days > 0
# calculations here to compute the solution
# remember to use constants T R and F in your calculations
# use the correct answer provided
c=(d*(1.08)*R)+5 #implemented here
print(" the cost for ", d, " days is ", c )
else: # here m is <= 300 # s <= 0
print(" Invalid entry for days ", d )

output:

>>>
Enter the number of days stayed at the hotel 10
the cost for 10 days is 1085.0
>>>