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
Klio2033 [76]
3 years ago
14

Write a program that prompts the user to enter: The cost of renting one room The number of rooms booked The number of days the r

ooms are booked The sales tax (as a percent). The program outputs: The cost of renting one room The discount on each room as a percent The number of rooms booked The number of days the rooms are booked The total cost of the rooms The sales tax The total billing amount. Your program must use appropriate named constants to store special values such as various discounts.
Computers and Technology
1 answer:
Shtirlitz [24]3 years ago
6 0

Answer:

Written in Python

cost = float(input("Cost of one room: "))

numrooms = int(input("Number of rooms: "))

days = int(input("Number of days: "))

salestax = float(input("Sales tax (%): "))

print("Cost of one room: "+str(cost))

print("Discount: 0%")

print("Number of rooms: "+str(numrooms))

print("Number of days: "+str(days))

totalcost = numrooms * cost

print("Total cost: "+str(totalcost))

salestax = salestax * totalcost/100

print("Sales tax: "+str(salestax))

print("Total Billing: "+str(salestax + totalcost))

Explanation:

The next four lines prompts user for inputs as stated in the question

<em>cost = float(input("Cost of one room: "))</em>

<em>numrooms = int(input("Number of rooms: "))</em>

<em>days = int(input("Number of days: "))</em>

<em>salestax = float(input("Sales tax (%): "))</em>

<em />

The following line prints cost of a room

print("Cost of one room: "+str(cost))

The following line prints the discount on each room (No information about discount; So, we assume it is 0%)

print("Discount: 0%")

The following line prints number of rooms

print("Number of rooms: "+str(numrooms))

The following line prints number of days

print("Number of days: "+str(days))

The following line calculates total cost of rooms

totalcost = numrooms * cost

The following line prints total cost

print("Total cost: "+str(totalcost))

The following line calculates sales tax

salestax = salestax * totalcost/100

The following line prints sales tax

print("Sales tax: "+str(salestax))

The following line calculates and prints total billings

print("Total Billing: "+str(salestax + totalcost))

You might be interested in
Identify one or more negative and positive impacts of electricity.
shepuryov [24]

Answer:

positive results is the use of light to see

negative results is high power supply cause burning of things and make houses to burn

Explanation:

pls make me ur brainliest

5 0
3 years ago
Which of the following is not a recommended method to protect you from identity theft?
yaroslaw [1]

Answer:

post them, but id say anything with personal information

7 0
3 years ago
The Fibonacci sequence {fib}i≥1 is defined recursively as follows: fib(1) = 1, fib(2) = 1 and, fib(n) = fib(n-1) + fib(n-2) for
nadya68 [22]
<h2>Answer:</h2>

// Create a class header definition

public class Fibonacci {

   

   //Create a method fib to return the nth term of the fibonacci series

   public static long fib(int n){

       

       //when n = 1, the fibonacci number is 1

       //hence return 1

       if (n <= 1){

           return 1;

       }

       

       //when n = 2, the fibonacci number is 1

       //hence return 2

       else if(n == 2){

           return 1;

       }

       

       //at other terms, fibonacci number is the sum of the previous two

       //numbers

       //hence, return the sum of the fib on the previous two numbers - n-1

       // and n-2

       else {

           return fib(n-1) + fib(n-2);

       }

       

   }

   

   //Create the main method to test the fib() method

   public static void main(String[] args) {

     

       // Test the fib method with n = 9        

       System.out.println(fib(9));

     

   }

}

=====================================================

<h2>Sample Output:</h2><h2></h2>

34

======================================================

<h2>Explanation:</h2>

The program above has been written in Java and it contains comments explaining each line of the code. Kindly go through the comments.

The actual lines of code are written in bold face to distinguish them from comments.

Also, a sample output of a run of the program has been provided.

4 0
3 years ago
You have video-recorded a friend’s birthday party. You compressed the video so it uploads quickly. What are some signs that you
Hatshy [7]

Answer:

(A) graphical glitches (B) choppy frames (D) sound that does not match motion

Explanation:

I did the assignment and (A) (B) (D) were correct.

                                           hope it helps

4 0
3 years ago
List and explain the factors to consider when buying a computer
PSYCHO15rus [73]

Answer:

what it's main use is going to be

Explanation:

The main factor when considering buying a PC is what it's main use is going to be. This will determine what components you will need to look for. For example, if you are going to use the computer for video editing and work then you will need one with a high end CPU and lots of RAM. If you are going to use the PC for regular everyday use such as work programs (AutoCAD, Office, Photoshop, etc. ) Then you can buy a regular office computer with a mid-tier CPU, and 8GB of RAM, and no graphic card. A PC for gaming at high resolutions will require all high end parts including a high end graphics card. Therefore, knowing what its main use will be will determine cost, and what tier components you will need to buy.

3 0
3 years ago
Other questions:
  • Ooooooooooooooooooooooooooooh im blinded by the lightssssssssss
    11·1 answer
  • Declare a character variable letterStart. Write a statement to read a letter from the user into letterStart, followed by stateme
    10·1 answer
  • What is one way to measure technological progress?
    5·1 answer
  • A search engine is the same as a browser.<br> \
    11·1 answer
  • List the steps in setting up an online banking account
    12·2 answers
  • A technician needs to be prepared to launch programs even when utility windows or the Windows desktop cannot load. What is the p
    11·1 answer
  • Consider Ron’s budget. How much money does Ron have left over each month?
    9·2 answers
  • Select the online reading comprehension tool that best fits the description. This tool lets users change text from one language
    6·2 answers
  • TRY IT Choose the Right Technology MP3 player Widescreen laptop computer Smartphone Tablet computer with wireless Internet Suppo
    8·2 answers
  • Answer is B because portrait is define that they take only photographs of people and like to communicate with people they are we
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!