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
When you are using the internet to research a school project, and you ignore the banner ads on websites even though you see them
FinnZ [79.3K]

Answer:

The answer is "selective exposure".

Explanation:

It is a theory in psychology, that is sometimes used in marketing and advertising studies. It traditionally applies to the propensity of people to prefer evidence, that enhances existing previous views while ignoring conflicting information.

These types of approaches are occurring, when the people pursue knowledge and consistently express desires for solutions, that are associated with their beliefs, rather than incompatible.

5 0
3 years ago
Unix has experimented with several security programs. a user can attach a watchdog program to a file that grants or denies acces
Cloud [144]

Watchdog Program

This program becomes the number one security mechanism for file access.

Pros:

  1. A benefit of using watchdog program is that you have a centralized mechanism for controlling access to a file
  2. You are assured of having secure access to your file

Cons:

  1. It becomes a bottleneck.
  2. If this program has a security hole, there are no other guaranteed backup mechanisms for file protection.

COPS

COPS is a collection of a dozen programs that attempt to tackle problems in UNIX security. It checks for a number things like poor passwords, device permissions, files run in /etc/rc*, existence of root SUID, and many other things.

Pros:

  1. This program provides methods of checking for common procedural errors.
  2. COPS collect outputs and either mails the information to the admin or logs it in.

Cons:

  1. It could be modified by an intruder or even take advantage of its features.
  2. It is meant to tighten the security, not a tool to be used to find security flaws. It does not directly correct errors found.

5 0
4 years ago
In what way, if any, is a model different from a simulation?
madam [21]

Answer:

Models and Simulations are completely different in that they achieve diffenet results.

Explanation:

Modeling is the act of building a model. A simulation is the process of using a model to study the behavior and performance of an actual or theoretical system. In a simulation, models can be used to study existing or proposed characteristics of a system. ... Simulating is the act of using a model for a simulation.

6 0
3 years ago
A top level class may have only the following accessmodifier.
GREYUIT [131]

Answer: Public

Explanation:

 A top level class can have a public, as top level cannot be private and protected because the modifier private is not allowed. As, top level is a class which is not a nested class. Interface of a access modifier is either public or no modifier. There are two types of access control modifier are top level - public and member level- private, protected.

3 0
4 years ago
You receive a request for a report on your office’s productivity. How should you respond to that e-mail?
ki77a [65]

In the case above, the ways that one need to respond to that e-mail is that:

  • Tell the sender that you have received their e-mail and will work on the report.

Check more about email below.

<h3>What is the email about?</h3>

A response email is known to be a kind of an email that is made reply to another email.

Note that In business, this is said to be a type of email that a person will have to write in regards to  inquiry response email, declining an invitation and others.

Hence, In the case above, the ways that one need to respond to that e-mail is that

  • Tell the sender that you have received their e-mail and will work on the report.

Learn more about  e-mail from

brainly.com/question/24688558

#SPJ1

7 0
2 years ago
Other questions:
  • Which statement about trees is false?
    12·1 answer
  • Is an electronic scavenger hunt played around the world.
    7·1 answer
  • Write a program that produces this output:
    10·1 answer
  • ANSWER THIS CORRECTLY FOR BRAINLIEST
    13·2 answers
  • Technician A says in computer language a 0 or 1 is called a bit. Technician B says in computer language a 0 or 1 is called a byt
    13·1 answer
  • Generally, the more secure the system, the less usable it becomes. <br> O True O False
    9·2 answers
  • PHP can be run on Microsoft Windows IIS(Internet Information Server):
    5·1 answer
  • Which part of the Word application window should the user go to for the following activities?
    14·1 answer
  • Answer this crossword for brainliest and 15 points
    9·1 answer
  • Describe two steps to find if photos can be legally used
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!