The distance a vehicle travels can be calculated as follows: distance = speed * time For example: If a train travels 40 miles per hour for 3 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 how many hours it has traveled. The program should use a loop to display the distance the vehicle has traveled for each hour of the time period.

Answers

Answer 1

Answer:

In Python:

speed = float(input("Speed: (mile/hr): "))

time = int(input("Time: (hr): "))

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

    distance = speed * hour

    print("Distance: "+str(speed)+"*"+str(hour)+" = "+str(distance))

Explanation:

This prompts the user for speed in mile/hr

speed = float(input("Speed: (mile/hr): "))

This prompts the user for time in hr

time = int(input("Time: (hr): "))

This iterates through the input time

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

This calculates the distance covered in each hour

    distance = speed * hour

This prints the distance covered in each hour

    print("Distance: "+str(speed)+"*"+str(hour)+" = "+str(distance))


Related Questions

please help me please help me.​

Answers

Answer:

dont know man thanks for points tho

but it is 209

Explanation:

A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one child class (subclass) C) A class cannot have a parent class (superclass) D) A class cannot have a child class (subclass) E) A class can have multiple parent classes (superclasses)

Answers

Answer:

The answer is A)

Explanation:

In programming languages like java you can only use single inhertance meaning a class can only inherit attributes from one class. But in other languanges like C you can have multiple inhertance

Using the Internet, search and discuss why naming conventions are important and why programmers should consistently follow them. What problems can arise in naming variables if one convention is not followed.

Answers

Answer:

Answered below

Explanation:

Some variable naming conventions include;

1) Variable should begin with either a letter or an underscore.

2) Variables having multiple words should have the first letter of every word after the first word, capitalized. This is the camelCase style.

3) variables should not be named after any of the inbuilt keywords except on special operations to override the original function of such keyword.

4) variable names are case-sensitive.

The importance of following these conventions is to maintain readability and consistency of code. Failure to follow these conventions may lead to chaotic codes, bugs and inefficient performance.

Type the correct answer in the box. Spell all words correctly.

Bill uses a software application that helps him make digital representations of buildings from design and construction through operation and

even demolition. Which software application does Bill use?

Bill is working on an architectural project and he uses_______

applications, such as ArchiCAD, to create digital replicas of buildings.

Answers

Answer:

ArchiCAD or AutoCAD

Explanation:

Bill is working on an architectural project and he uses a program such as ArchiCAD or AutoCAD. Each of these software applications are built from the ground up specifically for architects. It allows experienced Architects to design and create digital representations of different buildings, houses, apartments, or any other design that they may have in mind. This includes specific details, materials, specifications, demolition representations, etc.

Describe the major issues surrounding the decisions to build and/or host your own e-commerce Web site or to outsource some aspects of site development. Include the advantages and disadvantages of each decision.

Answers

Answer:

Explanation:

The main issue with this is the time and cost of buildling and maintaining your server. You will need to know how to build a server to host your own e-commerce site but will also need to learn how to manipulate data. This includes being able to save and pull data from the server. Once you have this done then the rest is easy since that is the biggest disadvantage of hosting your own site. The biggest advantage is that you have full control over your data and do not have to pay monthly fees and hidden fees to any hosting site.

The major issue surrounding the decisions to build or hosting of your own e-commerce is that one will need a multiskilled staff.

It should be noted that when an individual wants to build an e-commerce site, they'll need a multiskilled staff like graphic artists, programmers, project managers, and web designers.

The person will also purchase the appropriate hardware and software. There are also several risks that come with building a site from scratch. The cost involved is also high as the requirements to build the site are complex.

Read related link on:

https://brainly.com/question/17429269

draw internal architecture of computer​

Answers

Answer:

If this is good, let me know in the comments and I'll draw it

Explanation:

NEED HELP WILL MARK BRAINLIEST AND 25 POINTS FOR ANSWER Xavier is using a query that includes a LIKE comparison operator with the value of A[a-n)" Which option would
match this operator?

Apple

Aaron

Assist

Azure

Answers

Answer:

This will match the name Aaron

Explanation:

Using square brackets around a range indicates that a single character within the range of the brackets can be match.

In something like the given example

WHERE name LIKE "A[a-n]"

It will match all names that start with a capital A, which is immediately followed by a lowercase a through n.

What would be the result of the following calculation in a spreadsheet?


=5+10/5-3*3-1


a. -1

b. -3

c. 1

d. 3

e. 0


answer: B. -3

Answers

Answer:

answer a -1

b-3 hi hello who are you

when you tried to login to server your trail may faild this failure event is recorded in

Answers

Real time not online time...

The programming interface for a legacy motor controller accepts commands as binary strings of variable lengths.

a. True
b. False

Answers

Answer:

The answer is "Option a"

Explanation:

The given question is incomplete, that's why its correct solution can be defined as follows:

The above-given question is the part of the Binary Autocomplete, in which this Autocomplete function would be a full word or sentence after just a few other letters were entered into the system. It approach improves text taking appropriate on smartphone devices of particular because every letter should not be written in such a single phrase.  

1.in 3 sentences explain briefly what are the examples of the advantage of using multimedia approach in a slide presentation brainly​

Answers

Multimedia Presentations is very essential in making slide presentation because:

it makes the presentation colorfulIt is often purpose driven andIt challenges one and all listeners to think creatively

Some advantages of Multimedia includes

Oresentations made are concise, rich and makes one to develop confidence in language skills.They captivate audience to visualize what is been taught.

Multimedia agent includes video podcasts, audio slideshows etc. The use of the multimedia in presentation is also very good and user-friendly. It doesn't take much energy out of the user, in the sense that you can sit and watch the presentation,

Conclusively, It uses a lot of the presenters senses while making use of multimedia such as hearing, seeing and talking.

Learn more from

https://brainly.com/question/19286999

What is the correct term for a piece of malware that hides inside a legitimate software program or file from trusted sources

Answers

Answer: Trojan horse

Explanation:

Based on the Greek legend of how Greek soldiers hid in a Trojan horse to infiltrate and destroy Troy from within, Trojan horse malware mirrors this attack when attacking software.

It hides inside and disguises itself as a legitimate software program or a file from a trusted source and then when clicked on, it works to infect the software.

What will be the output of the following:

i) 10%2 ii)10**2​

Answers

Answer:

The output of 10%2 is 0The output of 10**2 is 100

Explanation:

We will see the output one by one.

i) 10%2

The statement consists of modulus operator also called as remainder operator. The remainder operator gives the remainder when the first operand is divided by the second operand. The remainder operator only works on integers.

So the output of the statement will be: 0

ii)10**2​

The double asterisk is used for exponent. The second operand is the power and the first operand is the base.

So the output will be: 10**2 = 10^2 = 100

Hence,

The output of 10%2 is 0The output of 10**2 is 100

Write a program that takes a set of numbers and determines which is the smallest. Ask the user for the following information, in this order: A terminating value (real number). The user will enter this value again later, to indicate that he or she is finished providing input. A sequence of real numbers. Keep asking for numbers until the terminating value is entered.

Answers

Answer:

This solution is implemented in C++:

#include<iostream>

#include<bits/stdc++.h>

using namespace std;

int main(){

double termnum;

cout<<"Terminating number: ";

cin>>termnum;

 

double num;

vector<double>numbers;

cout<<"Number: ";

cin>>num;

while(num!=termnum){

numbers.push_back(num);

cout<<"Number: ";

cin>>num;

}

double smallest = numbers.at(0);

for(double x:numbers){

 if(x < smallest){

  smallest = x;

 }

}

 

cout<<"The smallest is "<<smallest;

return 0;  

}

Explanation:

This declares the terminating variable as double

double termnum;

The next italicized lines prompts user for terminating value

cout<<"Terminating number: ";  

cin>>termnum;

This declares the user input variable as double  

double num;

This declares vector of numbers as double

vector<double>numbers;

The next italicized lines prompts user for number

cout<<"Number: ";

cin>>num;

The following iteration is repeated until the terminating value equals the number supplies by the user

while(num!=termnum){

This pushes the number to a vector

numbers.push_back(num);

The italicized lines prompts user for another number

cout<<"Number: ";

cin>>num;

}

This declares and initializes variable smallest

double smallest = numbers.at(0);

The following for loop determines the smallest of the number set

for(double x:numbers){

 if(x < smallest){

  smallest = x;

 }

}

 This prints the smallest of the set

cout<<"The smallest is "<<smallest;

return 0;

Also: See attachment

An array similar to a phone book has 1000 names arranged as names [0], names[1]....names[999]. Nancy wants to search a name X in this array. Which of the following preconditions must she ensure to perform a binary search?

The list has a large number of names.
The name X is present in the list.

In addition to the two statements above, which of the following is correct?

a. There should be no duplicates in the list.
b. The names in the list should be alphabetical order.
c. The name X should occur near the middle of the list.

Answers

Answer:

Preconditions that she must ensure to perform a binary search are:

The list has a large number of names.

The name X is present in the list.

c. The name X should occur near the middle of the list.

Explanation:

Nancy's binary search for a name X should begin by comparing an element in the middle of the array or list with the name X (target value). If this name X's value matches the value of an element in the list, Nancy must return its position in the array.  If the name X's value is less than the element's value, Nancy will continue the search in the lower half of the array.  Usually, the name X should occur near the middle of the list or array.

Rita tried unsuccessfully to open a PDF file attachment in her Inbox by double-clicking the attachment in the Reading Pane. What is the most likely reason that the file would not open properly? The PDF attachment should have been right-clicked. PDFs are too large to be sent through most e-mail systems. An add-in for PDFs was not set up in the system. Outlook never accepts PDF files as attachments.

Answers

Answer:

3rd option

Explanation:

Which of the following methods can be used to solve the knapsack problem?

a. Brute Force algorithm
b. Recursion
c. Dynamic programming
d. All of the mentioned

Answers

Answer: D. All of those mentioned

Explanation:

The knapsack problem is a problem that typically occurs in combinatorial optimization and is also a 2D dynamic programming example.

We should note that all the methods given in the option such as recursion, brute force algorithm and dynamic programming can all be used to solve knapsack problem.

Therefore, the correct answer is D.

What needs to be defined throughout an animation sequence to define the start and end points of motion? A. frames B. characters C. key frames D movement ​

Answers

Answer:

c;= , the answer is C key frames

Explanation:

the explanation is because a single still image is an animated sequence that occurs at an important point in that sequence. In order to Define pivotal points of motion before the key frames , in between are drawn or otherwise created to tween the motion between the two key frames. Look it up on the internet ask the exact same question you have wrote down and it will give you this this exact answer your answer is key frames

Match the stages of the desktop publishing process with the corresponding actions.

(Design, Setup, Prepress, Printing, and Content)

enter text and images

create an initial outline or draft of the artwork

choose a specific document template with appropriate DTP software

perform the tasks to get the artwork ready for printing

choose either to print or publish the product online

Answers

Answer:

Enter text and images - Content

Create an initial outline or draft of the artwork - Design

Choose a specific document template with appropriate DTP software - Setup

Preform the tasks to get the artwork ready for printing - Prepress

Choose either to print or publish the product online - Printing

--------------

Explanation:

a user reports that her computer monitor will not allow her to switch back and forth between Microsoft word and internet explorer.

Answers

Answer: B. Interrupts

Explanation:

Interrupts is a feature of digital computers that enables the interruption of the process the computer is currently engaged in so that the computer can process the new command. Interrupts is the reason I am able to type this answer because interrupts is interrupting my browser to process my typing.

If a user reports that their computer monitor will not allow her or him to switch back and forth between Microsoft Word and Internet Explorer, it is possible that the interrupts function is not working effectively to enable the switch. by interrupting one of the programs.

Answer:

.....................

B. Interrupts

Review the advantages of database management systems in the Connolly textbook. Which two advantages do you think are the most important

Answers

Answer:

The two advantages of database management systems that are the most important are:

1. Data sharing: Database management systems enable data to be shared among users from different locations.  It provides access to many users of the data, who can make specific data requests to meet their information needs.

2. Data consistency: Database management systems make it possible for all users to have the same data.  It eliminates the problem of inconsistent data for decision making.

Explanation:

Basically, a Database Management System (DBMS) is defined as the software that enables end-users to create, read, update, delete, and access data in each database.  Among the most notable advantages of Database Management System (DBMS) are improved data sharing and security, minimized data inconsistency, better data integration, improved data access, improved decision making, and increased end-user productivity.

Which of the following variable names follows the rules for naming variables?
A. snack $
B. favorite_snack
C. lunch time
D. 15 minute snack

Answers

D. 15 minute snack
Sorry if wrong

Which of these are true? Check all that apply.

a. You can have many processes running for one program.
b. A program is a process that is executed. A process is a program that we can run.
c. A program is initially stored in RAM. A process is initially stored in the hard drive.
d. A program is an application that we can run. A process is a program that is executed.

Answers

Answer:

The following are true according to the process and the information which is  being implemented.

b. A program is a process that is executed. A process is a program that we can run.

c. A program is initially stored in RAM. A process is initially stored in the hard drive.

d. A program is an application that we can run. A process is a program that is executed.

Explanation:

Statements that are true as regards how programs and the information is  being implemented are;

A program is a process that is executed. A process is a program that we can run.A program is initially stored in RAM. A process is initially stored in the hard drive.A program is an application that we can run. A process is a program that is executed.

According to the question we are to discuss program and its implementation and how it is been run.

As a result of this we can see that program is an application that we can run. A process is a program that is executed.

Therefore, program is a process that is executed. A process is a program that we can run..

Learn more about program at;

https://brainly.com/question/16397886

NEED HELP WILL MARK BRAINLIEST AND 25 POINTS FOR ANSWER Which statement best describes a characteristic of a relational database?

It contains tables that are completely independent of one another.

It contains tables with fields that are associated with one another.

It is a feature that is primarily used to navigate databases.

It is a feature that is primarily used to add queries to tables.

Answers

The relational database has the characteristic feature of the adjoining of data with one another.

What is a relational database?

The relational database is given as the interconnection of the data with the digital database management system.

The relational database is given with the characteristics of the adjoining of data tables and fields associated with one another. Thus, option B is correct.

Learn more about relational database, here:

https://brainly.com/question/13262352

#SPJ2

Which statement is true for rapid prototyping? (A. It creates a two-dimensional model of a part or a product, from the original model of the product.) (B. It is also known as 2D printing.) (C. It helps to avoid costly mistakes by allowing corrections early in the production process.) (D. It is also referred to as layered modeling.) ​

Answers

Answer:

C: It helps to avoid costly mistakes by allowing corrections early in the production process.

Explanation:

Remember, a prototype refers to an early sample or model of a product that is designed to test and figure out a concept or process.

The Rapid prototyping process has many advantages, besides being faster with the use of 3D dimensional technology, it allows for easy corrections of design/modeling errors early in the production process.

Answer:

C.

Explanation:

Plato

Problem decomposition means
O Fixing the problem
O Solving the problem
O Breaking down tasks into smaller, manageable parts
0 None of the above
PLEASE HELPPPPPP

Answers

Answer: Breaking down tasks into smaller, manageable parts

Explanation:

The word decomposition means to break down so Problem decomposition means to break down the problem being faces into smaller parts with the reason being to be able to manage it better.

Some problems are simply too large to handle singularly because of the amount of resources that would have to be devoted. It would be better to break them down into smaller tasks that can then be be confronted one at a time with enough resources to solve them each.

rheumatoid arthritis is caused when​

Answers

Answer:

caused by the immune system attacking healthy body tissue.

Explanation:

all though they are not sure what triggers it

You already know about lists. What missing function will return the index of 7 in the list? >>> myList = [12, 5, 7, 3, 25] >>> myList. (7)

Answers

Answer:

The index function

Explanation:

Required

What function is needed to complete the program

To return the index of an item in a list, we make use of the index function.

In this case, the complete program will be:

myList = [12, 5, 7, 3, 25]

print(myList.index(7))

At the end of program compilation and execution, the index of 7 (which is 2) will be returned/printed.

Answer:

index

Explanation:

_______ is a standard protocol used for synchronous communication.

Answers

Answer:

TCP/IP

Explanation:

Synchronous communication possesses the clocks on easy transmission as well as receiving devices in a lot more significant ways.

So, synchronous communication usually permits more information to be disseminated over a circuit per unit time.

The standard protocol for this synchronous communication is TCP/IP.

Complete the getOdds method so it returns a new ArrayList of Integers containing all odd Integers from the parameter ArrayList vals in the order they originally appeared. The contents of vals should not change. For example if an ArrayList containing the Integers 2, 5, 8, 6, 7, 3, 12 in that order is passed as a parameter to getOdds, it should return an ArrayList containing the Integers 5, 7, 3 in that order. Write your getOdds method in the U7_L2_Activity_Three class. Use the runner class to test your method but do not add a main method to your U7_L2_Activity_Three.java file or your code will not be scored correctly.

Answers

Answer:

Answered below

Explanation:

//Program is written in Java programming language.

public ArrayList<Integer> getOdds( ArrayList<Integer> list){

// Create variables to hold the new list and the //indexes.

int i;

ArrayList<Integer> oddList = new ArrayList<Integer>()

//Loop over the list and add every odd element // to the new list

for ( i = 0; i < list.length; I++){

if ( list[i] % 2 != 0){

oddsList.add(list[i])

}

}

return oddList;

}

Other Questions
HELP! What is the surface area of this shape? This TED Talk indicates that journalism sources today are often audience driven rather than personal sources from the journalists themselves. Based on this, what changes do you think that journalists must make in sourcing their information How many total ions are in 2.95 g of magnesium sulfite? Part A: Draw arrows on the graph below for RISE and RUN. *Remember to start at the left point.*Part B: Find the slope of the line from the graph above. *Don't forget to simplify!* how much should dave charge for donuts? The sun is located in the center of our solar system. Where is the sun located in our disc-shapedgalaxy? Which major event occurred in the Third Punic War?Roman gains Sicily as its first provinceO Roman capture and defeat of CarthageO Hannibal leads an invasion of ItalyRoman armies take control of all of Spain The diagram shows an isosceles righttriangle. Follow these steps to explore therelationship between side lengths.m2 ABC = 45MZ ACB = 451. Measure the length of each leg andthe hypotenuse:AB =unitsAC =unitsBC =unitsBCAIIIIIIIIIIIIIIIIIIII Which of the following is an example of a powerful action taken by the United Nations (UN)?A. Setting aside lands in Palestine for Jewish people and declaring it a nationB. Ending the Cold War with a truceC. Preventing the United States and its allies from invading VietnamD. Declaring war on the USSR If the gas tap to the Bunsen burner is turned on, the methane does not start burning until it is lit with a match. Why is heat from the match needed to start the methane burning? A number line going from negative 2 to positive 2 in increments of 1. There are 2 equal spaces between each number. The line contains negative 2, A, negative 1, B, 0, C, 1, D, 2.Identify the location of each point on the number line.12 is Point .12 is Point .112 is Point .112 is Point . The Monkey's PawStudy SyncThe Monkey's PawSimpsonsSimilaritiesMood (how youfelt whenlistening to thestory:Mood (how youfelt whenwatching the clip:Theme:Characters:Characters:Wishes madeand outcomeWishes madeand outcomeSetting:Setting: please help due in 10 mins. Tides are measured by the heights of the tide above or below sea level. The difference between the two heights represents how much greater the high tide is than the low tide. The table shows the high and low tides and the difference between their heights at each of three locations. Some of the data in the table are missing. Use this information for the problem below. Brianna had 20$ but spent d dollars on ice cream. Write an expression to represent how much Brianna has after buying ice cream Please please help please please ASAP please Drag the correct labels to the table. Not all labels will be used,Idenlify the effects of the War of 1812 on the United States.The options sayGains of territory and moneyMilitary heroes who went on to become national leaders A surge of national pride and confidence Further military conflicts with American Indians Dont forget not all will be used Blake challenges powerful people in their palaces' which are marked by the blood of good people. Why is the speaker angry with the soldiers being killed? Why do you need to learn about Volcanoes? Choose the best Spanish equivalent to the phrase. The car is far away from the park. El carro est lejos del parque. El carro est lejos al parque. El carro est lejos de el parque. El carro est cerca del parque. A study guide can be createda. On a computerb. By handC. Both of thesed. None of thesePlease select the best answer from the choices providedABD