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
koban [17]
4 years ago
5

Write a program that asks the user for the speed of a vehicle (in miles per hour) and how many hours it has traveled. It should

then use a loop to display the total distance traveled at the end of each hour of that time period
Computers and Technology
1 answer:
HACTEHA [7]4 years ago
5 0

Answer:

speed = float(input("Enter the speed: "))

hours = int(input("Enter the hours: "))

distance = 0

for i in range(hours):

   distance += speed * 1

   print("The distance after " + str(i+1) + ". hour(s): " + str(distance))

Explanation:

*The code is in Python.

Ask the user to enter the speed and the hours

Initialize the distance as 0

Create a for loop that iterates hours times. Inside the loop, calculate the cumulative distance traveled at the end of each hour and print it (Note that the distance = speed x hour)

You might be interested in
Brian is selecting an authentication protocol for a PPP connection. He would like to select an option that encrypts both usernam
aleksklad [387]

Answer:

CHAP

Explanation:

CHAP or Challenge-Handshake Authentication Protocol is the best option for Brian´s PPP connection. CHAP allows to validate the identity of users by using the three-way handshake at the first time of the connection and again at any moment after establishing the initial communication.

8 0
3 years ago
Ceteris paribus, if a student could either earn money tutoring or working as a server in a restaurant, then increases to the wag
navik [9.2K]

If a student could either earn money tutoring, then increases to the wages paid for serving will Increase the quantity of hours the student would serve.

<h3>What is ceteris paribus?</h3>

This is a term that connotes when all other things being equal. The word Ceteris paribus is known to be a Latin phrase that totally means "all other things being equal."

In economics, it is known to be a shorthand factor that shows the effect one economic variable is said to have  on another, given that all other variables remain the same as in the case above.

See options below

A. increase the quantity of hours the student would serve.

B. decrease the quantity of hours the student would serve.

C. increase the quantity of hours the student would tutor.

D.not change the quantity of hours the student would serve.

Learn more about Ceteris paribus from

brainly.com/question/868746

8 0
2 years ago
Give a recursive algorithm for finding the sum of the<br> first n odd positive integers.
Andrei [34K]
I'm writing that in some sort of pseudocode; if you don't understand it, feel free to ask for more details in the comments.

function sumOdd(n)
    if n==1 then
        return 1
    end if
    return (sumOdd(n-1))+(n*2-1)
end function
3 0
3 years ago
Brainliest to Best Answer!
Shtirlitz [24]
ArrayIndexOutOfBoundsException
because it includes the extra info that you tried (and failed) to access an array
8 0
3 years ago
Since cam systems regulate and self-mange the manufacturing process, you classify them as
Anna007 [38]

Answer:

The CAM means Computer-Aided Manufacturing, and it monitors as well as manages on the self basis the complete manufacturing process, and hence it is being categorized as the Programmable Automation, that is responsible for the production of the products in various batches. It is in a real sense an Automated Manufacturing.

Explanation:

Please check the answer section.

3 0
3 years ago
Other questions:
  • You are a high school counselor with 9 students who applied for 3 different summer jobs: Job A, Job B, and Job C. Each of the su
    5·1 answer
  • Network Industries, Inc., wants to monitor its employees’ electronic com-munications. To avoid liability under laws related to e
    12·1 answer
  • I didn't go to school today and i want to know if my teacher would contact my parents.
    15·1 answer
  • In general, what are reasons that someone would choose to use lossy compression? Write a brief response below including at least
    10·1 answer
  • Global knowledge is the same as common knowledge.
    15·2 answers
  • Write a Python program that asks the user for a positive, odd value. Once the value is validated determine if the number is Prim
    11·1 answer
  • A company's desire to sell products and services: A. will ultimately lead to its doom. B. explains why the web took off C. can d
    9·2 answers
  • An eReader has a 956-pixel x 1290-pixel grayscale display with each pixel able to display 32 shades of gray. What is the KiB siz
    9·1 answer
  • What is the main difference between a peripheral device and other types of devices? Choose the best answer.
    12·1 answer
  • What is the computer generation​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!