1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ksenya-84 [330]
3 years ago
9

Write an application for the Shady Rest Hotel; the program determines the price of a room. Ask the user to choose 1 for a queen

bed, 2 for a king, or 3 for a king and a pullout couch. The output echoes the input and displays the price of the room: $125 for queen, $139 for king, and $165 for suite with king bed and a pullout couch. If the user enters an invalid code, display You selected an invalid option and set the price to 0.
Computers and Technology
1 answer:
vesna_86 [32]3 years ago
4 0

Answer:

<em>The programming language is not stated; However, I'll answer this question using Python programming language.</em>

<em>This program does not make use of comments; See explanation section for detailed explanation of the program</em>

<em>Program starts here</em>

print("Welcome to Shady Rest Hotel")

print("Please select any of the following:")

print("Press 1 for a queen bed:")

print("Press 2 for a king:")

print("Press 2 for a king and a pullout:")

userinput = input("Enter your selection: ")

if userinput == "1":

     print("You selected the queen bed")

     print("Price = $125")

elif userinput == "2":

     print("You selected a king bed")

     print("Price = $139")

elif userinput == "3":

     print("You selected a suite with king bed and a pullout couch")

     print("Price = $165")

else:

     print("Invalid Selection")

     print("Price = $0")

Explanation:

This line welcomes the user to the hotel

print("Welcome to Shady Rest Hotel")

The next 4 lines (italicized) gives instruction to the user on how to make selection

<em>print("Please select any of the following:")</em>

<em>print("Press 1 for a queen bed:")</em>

<em>print("Press 2 for a king:")</em>

<em>print("Press 2 for a king and a pullout:")</em>

This line prompts the user for input

userinput = input("Enter your selection: ")

If user input is 1, the italicized lines displays user selection, which is the queen bed and the price; $125

<em>if userinput == "1":</em>

<em>      print("You selected the queen bed")</em>

<em>      print("Price = $125")</em>

However, if user input is 2, the italicized lines displays user selection, which is the king bed and the price; $139

<em>elif userinput == "2":</em>

<em>      print("You selected a king bed")</em>

<em>      print("Price = $139")</em>

However, if user input is 3, the italicized lines displays user selection, which is a suite with king bed and a pullout couch and the price; $165

<em>elif userinput == "3":</em>

<em>      print("You selected a suite with king bed and a pullout couch")</em>

<em>      print("Price = $165")</em>

<em />

Lastly, the following is executed if user input is not 1, 2 or 3 and the price is set to 0

<em>else:</em>

<em>      print("Invalid Selection")</em>

<em>      print("Price = $0")</em>

You might be interested in
What is looping in QBASIC​
Elden [556K]

A looping is a set of instructions which is repeated a certain number of times until a condition is met. hlo dai k xa halkhabar

3 0
3 years ago
in the future, mobile technologies are expected to be used more than desktop computers today. what other improvements are helpin
vekshin1

The improvement that are helping support mobile computing is increase data storage online and more applications for mobile phone.

If the data storage capacity is increased, we will get a larger amount to store our files. We get more space to store our important files and access them as easily as possible. Mobile applications need to be improved, because with more applications we will find it easier to use these applications to help us do our work. With a larger number of data storage, we could be comfortable because data storage can increase your employees' flexibility by enabling them to access data anytime they want from any location.

Learn more about data storage online at brainly.com/question/13650923

#SPJ4

4 0
1 year ago
Please Help!! Digital Information Technology Class!!
Rama09 [41]
It’s probably GUI??.
6 0
4 years ago
Read 2 more answers
PLZ HELP ME! <br> Write pseudocode for getting a bowl of ice cream using at least four steps.
inessss [21]
1. Get the material that you need
2. Open the ice cream
3. Scoop out the ice cream using your materials
4. Put that scoop in a bowl
4 0
3 years ago
How do you change the desktop background in the macos mojave operating system?
sleet_krkn [62]

Answer: Click the System Preferences icon on the dock. In the first row, click Desktop & Screen Saver.

Explanation: When it comes to macOS versions, Mojave and High Sierra are very comparable. The two have a lot in common, unlike Mojave and the more recent Catalina.

8 0
2 years ago
Other questions:
  • For which punctuation symbol will you use the ring finger of your right hand?
    9·1 answer
  • Enter a formula using a database function to calculate the total value in the Cost column for expenses that meet the criteria in
    12·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    7·1 answer
  • An ip address in the address range 169.254.x.y, used by a computer when it cannot successfully lease an ip address from a dhcp s
    6·1 answer
  • Hey, how is everyone????????????????????????????????
    8·2 answers
  • Why is it so important to adhere to principles that have been put forth by reputable organizations to ensure that you are mainta
    10·1 answer
  • A row in a table _____? for computer class and i’m in the middle of a test!
    14·1 answer
  • Please help me willgive u brainliest​
    14·1 answer
  • What usually happens during the investigation &amp; analysis stage of the Systems Life Cycle
    15·1 answer
  • 3. Special keys labelled Fl to F12.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!