This assignment is similar to the Hotel exercise you did in class.
Additionally, for the Double King Room, the user can request a sofa-couch, which will be an additional $10.00. The memberships are the same.
Write a program to incorporate these changes. You may write the program from scratch (recommended) this is also fine given that programmers tend to do this often, but as you are now learning, I would highly recommend that you do everything from the very beginning.
Please write the code in Python.
Please find the code in pyhton. Please let me know if I need to use any other format.
room_type = input("Select room type: ").lower()
if (room_type == 'double king room'):
sofa_req = input("Do you need sofa couch? (yes/no): ")
if (sofa_req == 'yes'):
additional_price = 10
else:
additional_price = 0
total_price = ''
if(room_type == 'single room'):
total_price = '$59.99'
elif(room_type == 'double room'):
total_price = '$79.99'
elif(room_type == 'single queen room'):
total_price = '$89.99'
elif(room_type == 'double queen room'):
total_price = '$99.99'
elif(room_type == 'single king room'):
total_price = '$110.99'
elif(room_type == 'double king room'):
total_price = '$' + str(139.99+additional_price)
print("Total Price: ", total_price)
Get Answers For Free
Most questions answered within 1 hours.