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
Norma-Jean [14]
3 years ago
15

Distance Traveled The distance a vehicle travels can be calculated as follows: For example, if a train travels 40 miles per hour

for three hours, the distance traveled is 120 miles. Write a program that asks the user for the speed of a vehicle (in miles per hour) and the number of hours it has traveled. It should then use a loop to display the distance the vehicle has traveled for each hour of that time period. python
Computers and Technology
1 answer:
solmaris [256]3 years ago
8 0

Answer:

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

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

for i in range(1, hour + 1):

   distance = speed * i

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

Explanation:

Ask the user for the speed and hour as input

Initialize a for loop that iterates from 1 to the given hours

Calculate the distance after each hour, multiply speed by hour

Print the distance after each hour

You might be interested in
#include
meriva

Answer:

wait what

Explanation:

6 0
2 years ago
Read 2 more answers
Jacinta registered herself on a social-networking site. She receives one or two emails every day about promotional offers as wel
Rainbow [258]
It would be Spam. . . . 

3 0
4 years ago
PLEASE HELP ME!!!!!!!
vitfil [10]
It is probably a hyperlink, but it could be an action.
5 0
4 years ago
Read 2 more answers
Assume that your body mass index (BMI) program calculated a BMI of 20.6. What would be the value of category after this portion
vladimir1956 [14]

Answer:

normal is the answer

8 0
3 years ago
Read 2 more answers
Which wireless standard can stream data at a rate of up to 54 mbps using a frequency of 5 ghz?.
sleet_krkn [62]

Answer:

802.11a

Explanation:

4 0
3 years ago
Other questions:
  • Which factor helps drive globalization?
    9·1 answer
  • Untuk memberikan keterangan pada bagian bawah halaman dokumen yg akan diulangi pada setiap halaman dokumen yg digunakan fasilita
    8·2 answers
  • The options are file protection , fault-tolerance , fault line , file tolerance , and the question is which term describes the d
    6·1 answer
  • You develop an app, and you don’t want anyone to resell it or modify it. This is an example of: A
    5·1 answer
  • How do I answer other peoples question. is there something to click because i dont see it.
    14·2 answers
  • Write features of Fifth Generation of computer?​
    12·2 answers
  • Discuss how social media can affect social movements and social change.
    13·2 answers
  • When you are writing, which of the following can you do to help your
    15·1 answer
  • Study the graph and answer the questions. The numbers on the left side of the graph are in thousands.
    13·1 answer
  • When viewing an e-book section of an assignment in launchpad, you can return to your main course page at any time by clicking th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!