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
_____________________________ focuses on organizing, structuring, and labeling content in an effective and sustainable way.
Goryan [66]
The answer is (E) visual design
3 0
3 years ago
Your manager asks you to get details on a computer crash. What Windows Administration Tool could you use?
Law Incorporation [45]
  • The answer is "Option C" because the WMD is a freeware memory test software that works excellently.
  • It is a comprehensive math question, and it is also quite straightforward to use.
  • They suggest that you first test your ram with Memtest86, but you really should always test a second time with a different memory testing application to be certain.
  • Microsoft Windows Diagnostic is the second tool, that scans your laptop's physical memory & identifies any faults.
  • It requires a reboot to be used the system that will restart, and you'll be unable to your mouse in the Memory Diagnostic Tool.

The wrong choices can be defined as follows:

  • In option a, it is wrong because the data warehouse transforms data into information that may be used by an organization's decision-making process.
  • In option b, it is wrong because by using Metrics Collector Groups and logging the data, it was able to display real-time market data as well as collect and store data.
  • In option d, it is wrong because this is a tool used in Windows, which displays detailed information about major events that have taken place on your machine.
  • In option e, it is wrong because messages and trace logs could be viewed and sorted using the Log Viewer.

Learn more:

Memory Diagnostic: brainly.com/question/13606234

3 0
3 years ago
Read 2 more answers
Please answer in Java
ra1l [238]

Answer:

Scanner keyboard = new Scanner(System.in);

   

       

       

        double discount = 0;

        double productPrice;

        double subTotal;

        double salesTax;

        double saleTotal;

       

       

       System.out.printf("Enter the purchase amount:");

       productPrice = keyboard.nextDouble();

       

       if (productPrice > 10) {

          discount = 10;

}

       System.out.println( + discount + "% discount applied.");

       

       subTotal = (productPrice);

       salesTax = (subTotal * 0.14);

       saleTotal = (subTotal + salesTax - discount );

       System.out.printf("Subtotal: $%5.2f\n", subTotal);

       System.out.printf("Discount; -$%5.2f\n", productPrice - discount);

       System.out.printf("HST: $%5.2f\n", salesTax);

       System.out.printf("Total: $%5.2f\n", saleTotal + salesTax);

}

}

Explanation:

8 0
3 years ago
Join my giggl PLEASE i am so bored link will be in comments
asambeis [7]

Answer:

in which app we had to join

5 0
3 years ago
Read 2 more answers
What are the steps to create a new folder named C12000 and save it
MrRa [10]
You would go to downloads in your library then click new folder, name it, save it, then drag it there you need it
3 0
3 years ago
Other questions:
  • Each​ _____ in a relational database table is a unique record of something that users want to track.
    14·1 answer
  • You can change the color of the value of a cell or the background
    14·2 answers
  • Siona needs to make sure her ads are getting a minimum number of impressions on the top of the page. What type of automated bidd
    10·1 answer
  • If a full disk encryption (FDE) password is forgotten, what can be incorporated to securely store the encryption key to unlock t
    13·1 answer
  • Someone pleaseee answer my last question i just posted ;-;
    6·2 answers
  • Which of the following is an example of intellectual property?
    6·2 answers
  • What does C.L.O stands for?
    13·2 answers
  • Fill in the blanks : To store 3 character a computer occupies...................bytes memory space​
    8·2 answers
  • ওয়ার্ড প্রসেসিং এ একটি সাধারন ডকুমেন্ট প্রিন্ট করার পদ্ধতি বর্ননা কর?answered
    8·1 answer
  • What is alternative name of home page<br><br>​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!