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
How can u refer to additional information while giving a presentation
yawa3891 [41]

Answer:

There are various ways: Handing out papers/fliers to people, or presenting slides.

7 0
3 years ago
What are informational sessions?
arsen [322]

Answer:B

Explanation:

7 0
3 years ago
The physical components of a computer, such as a keyboard or hard drive, is called?
faust18 [17]

I'm assuming hardware.


Remember, Hard = Physical.


If that's not it, try peripherals.

4 0
3 years ago
100 POINTS FOR ANYONE WHO CAN DO THIS!
Nataly [62]

Let's check what can be modified

Before calling def we need adjective and conjunctions stored inside variables

Store them(You may change according to your choice)

\tt adjectives=("foolish","bad","long","hard")

\tt conjunctions=("and","but","for","after")

We have to make optional ,easy way ask the user to do instead of yourself .

\tt con=input("Enter\: yes\: if \:you \:want \:to \:use \:conjunctions:")

\tt adj=input("Enter\:yes\:if\:you\:want\:to\:use\: adjectives:")

If they click then we can proceed else no problem let the program run

\tt def\: conjunctionPhrase():

\quad\tt if\: con=="yes":

\quad\quad\tt return\:random.choice(conjunctions)+"\:"+nounPhrase()

\quad\tt else:

\quad\quad\tt continue

  • You may use pass also

\tt def\: adjectivePhrase():

\quad\tt if\:adj=="yes":

\quad\quad\tt return\:random.choice(adjectives)+"\:"+nounPhrase()

\quad\tt else:

\quad\quad\tt continue

4 0
2 years ago
Classify each of the cost items (a-h) into one of the business functions of the value chain Cost Item Value Chain Business Funct
rewona [7]

Answer:

Explanation:

a)In this process, the power, electricity, water, etc consumed by the Production department are assembled.

b)In this department, the products are processed and shipped to the retail customers. The costs required for shipping the Latitude line of products comes under the Distribution department.

c)The activities like planning, designing, white box and black box testing are done in the Design process of a product.

d. Salary of computer scientist working on the next generation of servers related to Development.

e. Cost of Dell employees' visit to a major customer to demonstrate Dell?s ability to interconnect with other computers related to Customer Service or Marketing.

f)The cost required for testing the products comes under the Research and development.

g)Marketing department includes the costs of market research, selling the products and other business costs.

h)Purchasing the cartridges from the external suppliers comes under the production department.

7 0
2 years ago
Other questions:
  • A computer which links several pcs together in a network is called
    10·1 answer
  • Describe network in terms of the class computer lab
    14·1 answer
  • What is the block of text at the bottom of the page called?
    7·1 answer
  • Write a program that continually prompts the user for an integer input until input is entered that is less than 0. Each input th
    9·1 answer
  • What items do you keep in a data base
    5·1 answer
  • Which statement does not describe how to save a presentation?
    11·1 answer
  • What do the buttons on the paste options menu do
    11·1 answer
  • You can minimize the Ribbon with a command contained on the _____.
    7·1 answer
  • How can we display outputs of DIR one screenful at a time? There are at least two different ways, and either one is acceptable.
    8·1 answer
  • Is this code object-oriented, or is it procedural? what clues in the code itself did you use to determine what kind of code it i
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!