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
Nadya [2.5K]
3 years ago
5

The hostel in which you plan to spend the night tonight offers very interesting rates, as long as you do not arrive too late. Ho

usekeeping finishes preparing rooms by noon, and the sooner guests arrive after noon, the less they have to pay. You are trying to build a C program that calculates your price to pay based on your arrival time. Your program will read an integer (between 0 and 12) indicating the number of hours past noon of your arrival. For example, 0 indicates a noon arrival, 1 a 1pm arrival, 12 a midnight arrival, etc. The base price is 10 dollars, and 5 dollars are added for every hour after noon. Thankfully the total is capped at 53 dollars, so you'll never have to pay more than that. Your program should print the price (an integer) you have to pay, given the input arrival time.
Computers and Technology
1 answer:
faust18 [17]3 years ago
4 0

Answer:

Answered below

Explanation:

// Python implementation

incrementAmount = 5

basePrice = 10

price = 0

arrivalHour = int(input("Enter arrival hour 0-12: ")

if arrivalHour < 0 or arrivalHour > 12:

print ("Invalid hour")

if arrivalHour == 0:

price = basePrice

else:

price = arrivalHour * incrementAmount

totalPrice = price + basePrice

if totalPrice > 53:

totalPrice = 53

print ("Your bill is $totalPrice")

You might be interested in
In HTML, an opening tag and its closing tag must appear on the same line. True Or False​
DaniilM [7]

Answer:

the answer is true, you cannot break the element apart EVERR!!!!!

3 0
3 years ago
Write a sentence that describes how a series circuit works.
Lorico [155]

Answer:

In a series connection, the current is the same through each component regardless of any kind of components are used or their values. The voltage drops across each component in the circuit are dependent upon the values of the components used in the circuit. Another way to view a series connection is that the positive end of each component is connected to the negative end of the previous component in a 'one after the other' arrangement. The negative end of each component is also connected to the positive end of the next component.

It is one of which every component is arranged in a series connection. Hence series circuit will have same current at all points of the circuit. The voltage drop across each component in the circuit adds up to sum of voltage source across each component and of an equivalent component value. Breaking of the series circuit will make entire circuit to stop working. Suppose consider the three bulbs are connected in series connection and if even one bulb burns out or broken then all the three bulbs will stop working as well. In series circuit components like current (I) is sum of all the element and Voltage is sum of all the voltage drops and resistance is the sum of individual resistances.

Explanation:

3 0
3 years ago
a ____ is a horizontal or vertical bar that appears when the contents of an area may not be visible completely on the screen.
pav-90 [236]
The answer is a Scroll bar, the description fits perfectly because you need to move it to see more of the content you are viewing, and it wont be completely. when the item does appear completely on screen then the bar is relatively large and there is  no need for scrolling, however the opposite occurs during when you cannot see all of it.
5 0
3 years ago
A byte in memory is identified by a unique number called its
Murrr4er [49]
It is identified by its address number.
4 0
3 years ago
HELP ASAP PLZZZZZ
musickatia [10]

Answer:

third one

Explanation:

3 0
2 years ago
Other questions:
  • How does coding work on computers?
    6·1 answer
  • divide the input array into thirds (rather than halves), recursively sort each third, and finally combine the results using a th
    15·1 answer
  • The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
    10·1 answer
  • Angle, oblique, regular, demi, roman, heavy, extra bold, expanded, and compressed are ___________ . Select one: A. type styles B
    10·1 answer
  • Gabriel needs to create a formula that does not change when it is copied to cell b2. which formula should he create?
    14·1 answer
  • Software for creating animations
    15·2 answers
  • What makes these Pokémon special?
    9·2 answers
  • Where does Reiner take eren after they have a fight?
    7·2 answers
  • Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing th
    6·1 answer
  • Modern helps to convert analog signal into digital and vice verse. true of false​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!