answer.
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]
2 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]2 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
Assume there is a machine with the IP address 129.82.102.63 with netmask /23, and with a parent NW whose netmask is 255.255.224.
blagie [28]

Complete question is:

Assume there is a machine with the IP address 129.82.102.63 with netmask /23, and with a parent NW whose netmask is 255.255.224.0.

For each answer, do not include any spaces, give full IP addresses/netmasks where these are requested, give the "/" as part of the answer for slash notation.

a. What is the parent NW's netmask in dotted decimal notation?  

b. What is the parent NW's netmask in slash notation?  

c. What is the child NW's (subnet's) netmask in dotted decimal notation?  

d. What is the child NW's (subnet's) netmask in slash notation?  

e. How many bits are there for host # portion for the parent NW? (Another way to say the same thing is How many bits do we manage - on the parent NW?)  

f. How many bits are there for NW# portion (within the parent address space) for the subnet?

g. How many bits are there for host # portion for the subnet?  

h. How many addresses can we assign to machines/interfaces on this subnet?

Answer:

a. 255.255.224.0

b. /19

255.255 amounts to 16 bits being 1. .224 means 3 more bits are 1. So, in total 19 bits are 1. Hence, total network bits are 16 + 3 = 19.

c. 255.255.254.0

/23 means 8 + 8 + 7 that means

first 2 octets are 1s and 7 bits out of the 3rd octet are 1s. Hence, /23 means 255.255.254.0

d. /23

e. 13 bits are reserved for hosts

Parent network mask is /19, so total 32-19 = 13 bits

f. 19 bits are reserved for the network in the parent address.

g. 9 bits

Subnetwork's mask is /23, so total 32-23 = 9 bits for the host portion.

h. Since 9 bits are reserved for hosts, a total of 29 -2 = 510 machines can be assigned the IP addresses. Two addresses will be network and broadcast addresses for the subnet that can't be allocated to any device.

Explanation:

3 0
2 years ago
+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~
Karo-lina-s [1.5K]

+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.

<em><u>please</u></em><em><u> </u></em><em><u>mark</u></em><em><u> </u></em><em><u>me</u></em><em><u> </u></em><em><u>as</u></em><em><u> </u></em><em><u>brainliest</u></em><em><u>. </u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em>

<em><u>follow</u></em><em><u> </u></em><em><u>me</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>my</u></em><em><u> </u></em><em><u>fr</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em>

6 0
2 years ago
Which of the following option is correct about HCatalog?
adell [148]

Answer:

Option (3) is the correct answer of this question.

Explanation:

  • HCatalog makes available Hive metadata to users of other Hadoop applications, such as Pig, MapReduce and Hive. it offers interfaces for MapReduce and Pig so that users can read data from and write data to the Hive warehouse.
  • This means users don't have to care about where or in what format their data is stored. So we know this way that Hcatalog makes sure our data is secure.
  • Others option does not belong to Hcatalog so these options are incorrect .

8 0
2 years ago
Gloria needs to show in spreadsheet form the number of students in her class who speak different languages. Which type of graph
vaieri [72.5K]
I think the most suitable chart to be used is a pie chart. A pie chart is used to show percentages and the best way to show relative sizes of data in your set. It is a good way to show which language is spoken more in the classroom, which is least spoken and at a glance. I hope my answer helps.
4 0
2 years ago
Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w
Gre4nikov [31]

Answer:

numInsects = 16

while numInsects < 200:

   print(str(numInsects) + " ", end="")

   numInsects *= 2

Explanation:

*The code is in Python.

Set the numInsects as 16

Create a while loop that iterates while numInsects is smaller than 200. Inside the loop, print the value of numInsects followed by a space. Then, multiply the numInsects by 2.

3 0
2 years ago
Other questions:
  • What are the two most important network-layer functions in a datagram network? what are the three most important network-layer f
    7·1 answer
  • To read encrypted data, the recipient must decipher it into a readable form. what is the term for this process? re-securing decr
    5·1 answer
  • When a button is selected, the computer processes the code contained in the buttons ____ event procedure?
    12·1 answer
  • Which description of the plain text file format is most accurate?
    11·2 answers
  • Remember that it is desirable for good block ciphers that a change in one input bit affects many output bits, a property that is
    9·1 answer
  • Create a class called Date that includes three pieces of information as instance variables—a month (type int), a day (type int),
    11·1 answer
  • Program MATH_SCORES: Your math instructor gives three tests worth 50 points each. You can drop one of the test scores. The final
    7·1 answer
  • Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the a
    9·1 answer
  • #Write a function called fancy_find. fancy_find should have #two parameters: search_within and search_for. # #fancy_find should
    9·1 answer
  • Alice just wrote a new app using Python. She tested her code and noticed some of her lines of code are out of order. Which princ
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!