Question: Write a Python Program Hotel room allocation for University: Points Ask use below mentioned Input: What is your Budget for the room? Is it 200

Write a Python Program

Hotel room allocation for University:

Points

Ask use below mentioned Input:

  1. What is your Budget for the room? Is it 200 or 300 or 400?
  2. What is your most recent GPA?

Costs of the room available in the hotel:

Room A: 200$; Double bed

Room B: 300$; Double suite

Room C: 400$; Masquerade double room

Discounted price for the student who got GPA 3.2 or more than 3.2:

Room A: 180$

Room B: 270$

Room C: 360$

Condition:

If student got more than 3.2 GPA and his budget is 200 then he will get 10% discounted price: 180. So, check student GPA and their Budget. Only 200$, 300$ and 400$ Budget input is allowed.

Output:

  1. Customer entered the budget: 200; GPA: 3.2

It should display: you are allocated with Double bed with 10% discount. Cost of the room: 180$

  1. Customer entered the budget: 300; GPA: 2.9

It should display: you are allocated with Double suite no discount. Cost of the room: 300$

  1. Customer entered the budget: 400; GPA: 3.4

It should display: you are allocated with Masquerade double room with 10% discount. Cost of the room: 360$

  1. Customer entered the budget: 100; GPA: 15.0

It should display: Invalid input

Hint: Use else if (elif and logical operators)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!