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]
3 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]3 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
Electricity fact topic
gregori [183]
''for kids'' i think thats what that mean
5 0
3 years ago
Read 2 more answers
Why are the READ and DATA statements used<br>together?​
3241004551 [841]

Explanation:

DATA statements are used in conjunction with READ statements. Together they assign numbers or strings to variable names.

4 0
3 years ago
What is the difference between an html opening tag and a closing tag?.
Doss [256]

Answer:

Explanation:

Generally speaking, there are two kinds of tags - opening tags: <html> and closing tags: </html>. The only difference between an opening tag and a closing tag is the forward slash "/". You label content by putting it between an opening tag and a closing tag.

HTML is all about elements.

7 0
1 year ago
¿Qué creo que debe considerar una empresa para elegir ellugar en el cual va a desarrollar su actividad económica osu emprendimie
zhannawk [14.2K]

Answer:

sorry I don't speak that language

8 0
2 years ago
In a virtual memory system, each process must have its own page table.(True or False?)
Anna71 [15]

Answer: True

Explanation:

 Virtual memory is the secondary storage memory and this type of memory are addressed as main part of the memory.

When the virtual memory copying in the physical memory then, at that time the operating system divide the memory into the file page with the address and definite size number. Then, the each page are store in a disk.

When this page are required then, the operating system copy from disk to main memory and then, the virtual address are converted into the  real address.

6 0
3 years ago
Other questions:
  • What is the output after the following code executes?
    14·1 answer
  • Write the execution steps if the input is a lion.
    11·1 answer
  • What part of the boot-up process initializes hardware and finds an operating system to load?
    14·1 answer
  • The computer has had far-reaching effects on our lives.how has the computer effected your life?
    8·1 answer
  • Which of the following Google tools support collaboration? Docs Sheets Slides All of the Above
    13·1 answer
  • The number of bits that can be transferred per second over a given transmission medium.
    6·1 answer
  • We already know that we can create a lunar lander application of the pipe-and-filter architecture style from three independent J
    6·1 answer
  • Define Indentation
    8·1 answer
  • Which type of error occurred in the following lines of code?
    13·1 answer
  • The information given to you by your teachers is always accurate and should never be questioned. Please select the best answer f
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!