Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems On GPUs In Databases

Authors: Johns Paul ,Shengliang Lu ,Bingsheng He

1st Edition

1680838482, 978-1680838480

More Books

Students also viewed these Databases questions