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
The art element line is a moving point.<br><br><br> True or False
sergeinik [125]
I’m pretty sure the answer is true
3 0
3 years ago
If you were a developer of software, what kind of software package would you develop? why ?​
Goshia [24]

Answer:

Software that would help my grandparents in the North end much money and help stop post harvest loss due to inadequate weather information Climate change etc

Explanation:

The app willbe able to tellif a soil is suitable forCropsthrough my othertechnologiesthat willcome with app it will alsodetect the whetherpattern accuratelyprovide securityin the farmand help farmers selltheir products online

7 0
3 years ago
You have an interface on a router with the ip address in the class c network subnet of 192.168.192.10/29. how many total host ad
Gemiola [76]
If 29 bits of the 32 available addressing bits are used for the subnet, then only 3 bits giving 2^3=8 combinations remain for the host addresses. 

In reality, the all zeros and all ones addresses are reserved. So, 8 addresses can exist, but 6 of those are available.

The way the question is formulated it seems the answer 8 is what they're after.
8 0
3 years ago
The communications standard used to transfer pages on the Web is called _____.
andrezito [222]
Hypertext Transfer Protocol (HTTP)
5 0
3 years ago
g Write a Racket function (process lst1 lst2) that processes the corresponding elements of the two lists and returns a list. If
blagie [28]

Answer:

  1. def process(lst1, lst2):
  2.    newList = []
  3.    for i in range(0, len(lst1)):
  4.        sum = lst1[i] + lst2[i]
  5.        newList.append(sum)
  6.    return newList
  7. list1 = [1, 3, 5, 7, 9]
  8. list2 = [2, 4, 6, 8, 10]
  9. print(process(list1, list2))

Explanation:

Firstly, create a function process that takes two input lists (Line 1). In the function, create a new list (Line 2). Use a for loop to traverse through the elements of the two lists and total up the corresponding elements and add the sum to the new list (Line 3 - 5). At last, return the new list (Line 6).

In the main program, create two sample list and use them as arguments to test the function process (Line 8 - 9). We shall get the output  [3, 7, 11, 15, 19].

8 0
3 years ago
Other questions:
  • What must you do first in order to change the font type size and colour of a particular text
    13·2 answers
  • one business rule is that each project has one manager. Identify two (and no more than two) problems with the data structure or
    9·1 answer
  • Karen has opened a new business and is using Google Display Ads to build awareness of her new products. How does Google Display
    6·1 answer
  • True/False: When you make a function call, the order of the arguments you send does not matter as long as the number of argument
    15·1 answer
  • What are the purposes of a good web page design?
    9·2 answers
  • Discuss how sentiment analysis works using big data?<br>​
    13·1 answer
  • The company generates a lot of revenue and is rapidly growing. They're expecting to hire hundreds of new employees in the next y
    6·1 answer
  • Hyper-Tech Enterprises manufactures mechanical parts used in air conditioning and heating units. The company employs over 300 wo
    13·1 answer
  • In a well-developed paragraph - using domain-specific vocabulary and academic writing - address the following writing prompt:
    12·1 answer
  • Write a program that produces the following output: CCCCCCCCC ++ ++ CC ++ ++ CC ++++++++++++++ +++++++++++++++ CC ++++++++++++++
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!