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:
- What is your Budget for the room? Is it 200 or 300 or 400?
- 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:
- 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$
- Customer entered the budget: 300; GPA: 2.9
It should display: you are allocated with Double suite no discount. Cost of the room: 300$
- 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$
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started