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
Please check my answers! (Java)
KatRina [158]

I think only II contains an error.

Tricky because, syntactically, all three are correct I.M.O.

However, if the goal is to iterate as many times as lotNumLength, then statement II loops one time too many. This is known as an off-by-one error.

4 0
3 years ago
The domain name is passed to a domain name server, which maps it to the correct IP address, and then the code behind the page is
maxonik [38]
It's an incomplete, therefore wrong, description of "<span>B. Browser using a URL to access a web page"

After the nameserver returns the IP address of the domain, the client machine makes the page request from the IP address. The client's browser parses (reads) the HTML code, makes calls to the server for any other files (href, img and media) and displays the HTML content according to visual specifications in the CSS (Cascading Style Sheet).
</span>
6 0
3 years ago
During the reconnaissance step of the attack, what open ports were discovered by Zenmap? What services were running on those por
Setler [38]

Answer:

Following are the solution to the given question:

Explanation:

It sends commands to its Nmap executable platForm, which is used to specified and retrieves the production. The  ZenMap utilizes templates, which are primarily Nmap.

The parameter templates to decide how scans become formed Several ports, like ports, are available: 11, 21, 22, 25, 53, 445, and 3306, all of which run TCP: Linux services, SMTP Postfix, Apache Tomcat/Coyote JSP.

5 0
3 years ago
1. What is scratch programming?<br><br>2. What is a sprite?
JulsSmile [24]
1. The answer to the question what is scratch programming is a language and an online community where children can program and share interactive media

2. The answer to the question what is a sprite is a two dimensional bitmap that is intergrated into a larger scence.

Hope this helps
If you don't understand plz message me
If you do plz brainlest me
If you need help with any other tecnology questions you can also message me for that too.
Thank you and have a wonderful day!!!
3 0
3 years ago
Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-referenc
morpeh [17]

Answer:

b. TRUE

Explanation:

Whenever they are passed as parameters to a function, the IO classes istream and ostream must be passed using a pass-by-reference parameter passing scheme.

This is because , assuming a pass by value semantics would require us to copy the value of the istream or ostream object which would be meaningless. In fact these objects don't even have a copy constructor at all. So such objects are always passed by reference.

7 0
3 years ago
Other questions:
  • System memory is on a computer motherboard?
    14·2 answers
  • HEY DO U LIKE TRAINS!
    7·1 answer
  • Which category of app does word processing software fall into? A. Productivity B. Entertainment C. Social networking D. Educatio
    14·2 answers
  • Which of the following is not a true statement about Christopher Columbus it oko
    15·1 answer
  • What is the leading use of computers
    15·2 answers
  • The game begins with the player having 20 POINTS
    11·1 answer
  • You want to allow members of the users group to use fdisk on the /dev/sda drive (and only that drive) and to use the yum command
    14·1 answer
  • Science Help
    11·1 answer
  • 50 points! ㅠㅠ does anyone speak korean or watch korean animes? 안녕 ㅋㅋ ㅇㅅㅇ How do people make animationsss.
    8·2 answers
  • Please list 15 safety rules that you think should be practiced in the Computer Technology classroom/lab.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!