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
If Chris has a car liability insurance, what damage would he be covered for
andrezito [222]

Automobile liability insurance covers damage that Chris would do to other people’s property.

Liability insurance is a type of insurance that covers the other person, it does not covered the insured person. This insurance would cover items like damage to someone else’s car or their personal property.

6 0
3 years ago
When entering a formula or function into a cell, most spreadsheet programs require that you begin with some type of symbol, usua
olga_2 [115]
This is a false statement, if that's the question.
4 0
3 years ago
A chip that wakes up the computer system
bezimeni [28]

Explanation:

The wake-up receiver is an ultra-low power chip that continuously looks out for a specific radio signal, called a wake-up signature, that tells it when to wake up the main device

4 0
3 years ago
MATH PLZ HELP ITS DUE IN 4 MINUTES​
zheka24 [161]

Answer:

2

Explanation:

8 0
3 years ago
Read 2 more answers
What is bandwidth? the speed at which data can be transferred from your wireless modem. a measurement of how much information ca
EleoNora [17]
<span>Bandwith is a measurement of the amount of data that can be up or downloaded at a give time, generally measured in seconds, over either a wireless or wired communication link.</span>
3 0
4 years ago
Other questions:
  • What statement needs to be included below to retrieve all rows from the Invoices table with InvoiceTotal greater than 100?
    9·1 answer
  • What is the red wavy underline beneath the text
    7·1 answer
  • Why does hamlet want to kill himself and what stops him from doing that?
    10·1 answer
  • What is the value of this expression?
    6·1 answer
  • Which of the following statement is most accurate? A. A reference variable is an object. B. A reference variable refers to an ob
    6·1 answer
  • How would you define media literacy?
    12·1 answer
  • Adobe Indesign project 4 museum indesign file. The instructions are 70 pages long I cant sit still long enough to read them
    11·1 answer
  • Data source contains addresses of the merge fields. true or false​
    8·1 answer
  • What is the outcome when a floating-point number is divided by zero?
    12·1 answer
  • Sarah is a detall-oriented programmer. While testing her program, what other skill would she have to apply in order to detect al
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!