Write a program to display MPH (Miles per Hour). Create a function to calculate the MPH. Ask the user for the number of miles driven and the number of minute it took to drive that many miles. Validate that both the number of miles and the number of minutes is a positive, non-zero number. Pass both the number of miles and the number of minutes to the function, and have the function return the MPH.

Answers

Answer 1

Answer:

In Python:

def MPH(miles,minutes):

   mph = round(60 * miles/minutes,1)

   return mph

   

miles = float(input("Miles: "))

minutes = float(input("Minutes: "))

if miles>0 and minutes>0:

   print("MPH: ",MPH(miles,minutes))

else:

   print("Positive inputs only")

Explanation:

This defines the function

def MPH(miles,minutes):

This calculates mph rounded to 1 decimal place

   mph = round(60 * miles/minutes,1)

This returns the calculated mph

   return mph

The main begins here

This gets input for miles    

miles = float(input("Miles: "))

This gets input for minutes

minutes = float(input("Minutes: "))

If miles and minutes are positive

if miles>0 and minutes>0:

This calls the MPH function

   print("MPH: ",MPH(miles,minutes))

If otherwise, this prompts the user for positive inputs

else:

   print("Positive inputs only")


Related Questions

Which of the following is NOT a common type of mic:
A. Lavalier
B. Shotgun
C. Stick
D. Parabolic
E. Handheld

Answers

Answer:

Uhh all of them are mics

Explanation:

I think it’s c I hope it’s right!

Across:
1. Pressing this key will cancel the data
you are typing
4. It stores the data into all of the selected
cell
Down:
2 It stores the data and moves to the next
cell to the rig
3. It stores the data and moves you to the
next cell below
5. It activates the cell for data editing
6. Clear only the formatting that is applied
to the selecte
8. It stores the data and moves you to the
next cell in the
7. The key that deletes only the content of
the selected cl​

Answers

26891jfootbggagusppdmvtgya rkofoocihhf.

Which one of the following is NOT a use of a database? sales statement patient list customer list inventory list

Answers

Answer:

a sales statement

Explanation:

From the different options provided, the only one that is not a use of a database would be a sales statement. These statements usually made at the end of the month or year which detail the companies' entire sales amount for that given time period. These hold alot of information but are mainly created once every cycle so there is never a need to use a database for such files. Also, these statements are rarely modified or requested so database usage would be wasted.

When using for loops and two-dimensional arrays, the outside loop moves across the ___________ and the inside loop moves across the ___________.

indexes, elements

columns, rows

elements, indexes

rows, columns

Answers

Answer: rows, columns

Explanation: :)

All changes
1.(01.01 LC)
To make sure you do not get too tired when using the computer for long periods of time, how often should you get up to stretch and move? (5 points)
O Every hour
O Every 10 minutes
O Every 30 minutes
O Every two hours

Answers

You should get up and move every 30 minutes

Hope  this helps

-scav

Answer:

C

Explanation:

What keys on the keyboard have the ability to move the cursor around on a window?

No links and files or I report!
Will give Brainliest!​

Answers

Answer:

Press the Windows key on your keyboard. In the box that appears, type Ease of Access mouse settings and press Enter . In the Mouse Keys section, toggle the switch under Use numeric pad to move mouse around the screen to On. Press Alt + F4 to exit this menu.

NO LINKS
Do you need to pay monthly to stream on Twitch?

Answers

I think so yeah $$$$

Select the correct answer.
Who takes care of the final layout of the product that meets the standards set by UX designers?
O A web developer
ОВ.
design director
OC. UX designer
OD. UI designer
Reset
Next
Hi

Answers

Answer:

UI designer

Explanation:

Write a program that prompts the user to enter their name store this value in a variable called name Prompt the user for their current age store this value in a variable called Create a variable dogAge which takes the age entered and multiplies by 7 Print to the screen “Your name is" name "and in dog years you are" dogAge "years old" To join multiple parts together in a print statement use commas: print (“Your name is", name, "and in dog years you are", dogAge)​

Answers

Answer:

Explanation:

The following code is written in Python. It prompts the user for the name and age, saves them to their own variables. Then it creates and calculates the dogAge variable. Finally, it combines all of this information and prints out the statement.

name = input("Enter your name: ")

age = input("Enter your age: ")

dogAge = int(age) * 7

print("Your name is", name, "and in dog years you are", dogAge, "years old.")

Why is it important to think about the programming language to use?

Answers

Answer:

"The choice of programming language determines the type of game you can make."

Explanation:

Programming language enables us to write efficient programs and develop online things based on the certain type of code.

PLZ HELP

Select the correct answer.
Jack is part of the software quality assurance team in a company. Which activity should Jack perform as a part of software quality assurance?
A.
billing
B.
recruiting
C.
testing
D.
installing
E.
accounting

Answers

Answer:

E. accounting

Explanation:

just bare with me

Answer:D SORRY IF IM WRONG

Explanation:

PLS DONT HATE

what is information richness

Answers

Information Richness is the ability of information to change understanding within a time interval.

Hope it helps. Have a great day.

Brainliest would be greatly appreciated.

___________________________________________________________

#SaveTheEarth

#SpreadTheLove

- Mitsu JK


Write
algorithm to read 100 numbers
then display the largest.

Answers

Answer:

see picture

Explanation:

There is no need to store all the values, you can just keep track of the highest. Up to you to create a numbers file with 100 values.

Create a program that: Provides access to a rolodex (list of names and contact information). Have the program accept a name to lookup and that prints the contact information of the matching name. Use an array for names and an array for email address and another array for phone numbers. Make sure that all three arrays contain corresponding information.

Answers

Answer:

Explanation:

The following code is written in Java, it asks the user for a name and looks that name up in the names array. If it finds it prints out all the values in that same index within every array to get the name, email, and phone number. If the name is not found it prints out that the client is not found.

//The code is attached in the text file below and picture shows the output of the working code.

Who is the one you shouldnt have killed from fnaf?
(I already know but whoever answers first and right gets brainlest)

Answers

Answer: He was thought to be one of William Aftons victims who is also thought to be the child who possessing golden freddy

Explanation:

Answer:

Cassidy I guess

Why data mining is crucial for the success of a business, explain with examples

Answers

Answer:

For businesses, data mining is used to discover patterns and relationships in the data in order to help make better business decisions. Data mining can help spot sales trends, develop smarter marketing campaigns, and accurately predict customer loyalty.

HELP PLZZZZZZZZ!!!!!!!!!!!

Type the correct answer in the box. Spell all words correctly.
Before a new email application could be released to the public, it was released for a few days to some account holders of a website. The project team then collected feedback from this limited number of users and later made the email application available for public use. What type of testing did the project team use?
The project team used_____________testing for the email application.

Answers

Answer:

Its either business format franchise or business brokers

what are the advantage of smaw welding process​

Answers

Answer:

Explanation:

The most portable of all welding processes. No need for separate gas shielding. Can be used in a wide range of environments including outdoors, in fabrication shops, on pipelines and refineries, on ships and bridges, and more. Is not sensitive to wind and draft

3. Comparing the Utopian and dystopian views of Technology according to Street (1992) which one in your view is more applicable to your society?

Answers

Answer:

The answer is below

Explanation:

The Utopian views of technology, according to Street 1992, describe society to be in good condition in terms of politics, laws, customs, ways of life. Hence, the system is designed to improve the community for the better.

In contrast, Dystopian is described as a society that is heavily controlled by some greedy, larger than life, apocalypse group of people or government, where the rights and freedoms of people are trampled upon, thereby leading to all sorts of negativity such as suffering, poverty, intimidation, violence, disease, and break down.

The view that is more applicable to my society is the Utopia due to the following reason:

1. The people in my society accept the laid down rules and ideals. We also favor individuality and innovation.

2. My society is quite dynamic and improves over time to establish an ideal utopian world.

3. My society ensures some leaders carry the other individuals in the society along in whatever they do.

A financially stable person is able to:
A. spend money without having to save.
B. use loans to cover his or her living costs.
C. default on loan payments.
D. save money.

Answers

I think D. To save money cuz thats how financially stable people stay financially stable

Answer:

Save Money

Explanation:

D

⚠️⚠️⚠️⚠️⚠️⚠️Help! What is not an advantage of using virtual machines?
You can run multiple operating systems on one physical machine.

It doesn’t take up any storage space on the physical machine.

You can save the entire state of a VM to your files.

Provides fault and security isolation for the computer’s hardware

Answers

Answer:

It doesn’t take up any storage space on the physical machine.

Explanation:

The virtual machine does take up some storage space on the physical machine.

Does anyone have the answers to edhesive 4.2 lesson practice I’ve been stuck on it for like 3 months

Answers

Answer:

1. 5, 10

2. 5, 7, 9, 11

3. 21

4. 10

Explanation:


3. Java is Platform Independent. This means;
A. Java can run on any OS
need an OS to run
C. Java requires more than one OS to run
portable
D. Java is not
B. Java does

Answers

A . I hope this is right

Answer:

Java can run on any OS

need an OS to run

Which option is the default configuration of the Junk Email Options in Outlook 2016?

No Automatic Filtering
Low
High
Safe Lists Only

Answers

Answer:

No Automatic Filtering

Answer:

NO automatic filtering

Explanation:

i took the quiz

Characteristics of RAM​

Answers

Answer:

Short Data lifetime, Less Expensive, Needs to be refreshed often, Smaller in size, etc. tell me if you need more.

which of the following is an example of bias in media?
A. a website that represents a controversial opinion as though it were fact
B. a television news program that presents both sides of a particular issue
C. a podcast expressing an authors opinion
D. a blog about the history of the civil war

Answers

Answer is A because stating a opinion as a fact is bias.

a website that represents a controversial opinion as though it were fact because stating a opinion as a fact is bias.

What is Website?

A website is a group of interconnected, publicly accessible Web pages with a common domain name. A website can be developed and maintained to serve a variety of objectives by an individual, group, company, or organization.

The World Wide Web is made up of all websites that are open to the public.

Although it is occasionally referred to as a "web page," this description is incorrect because a website is made up of multiple webpages. A "web presence" or simply "site" are other names for websites.

Therefore, A website that represents a controversial opinion as though it were fact because stating a opinion as a fact is bias.

To learn more about Website , refer to the link:

https://brainly.com/question/29777063

#SPJ2

PLS HELP WILL MARK BRAINLINESS AND 30 POINTS
In your own words in at least two paragraphs, explain why it is important, when developing a website, to create a sitemap and wireframe. Explain which process seems most important to you and why you feel most drawn to that process.

(i.e. paragraph one is why is it important and paragraph two is which process felt most important to you and why)

Answers

When creating a website, it is important to create a sitemap so that a search engine can find, crawl and index all of your website's content. a sitemap makes site creation much more efficient and simple. A sitemap also helps site developers (assuming you have any) understand the layout of your website, so that they can design according to your needs.

A wireframe is another important step in the web design process. Creating a website is like building a house. To build the house, you first need a foundation on which to build it upon. Without that foundation, the house will collapse. The same goes for a website. If you create a wireframe as a rough draft of your website before going through and adding final touches, the entire design process will become much easier. If you do not first create a wireframe, the design process will be considerably more difficult, and you are more likely to encounter problems later on.

To me, the wireframe is the most important due to the fact that is necessary in order to create a good website. In order to create a sitemap, you first need a rough outline of your website. Without that outline, creating a sitemap is impossible.

The link between violence in the media and school shootings has been proven to be direct. True/false?​

Answers

Answer:

most of the time a school shooting will be done by a kis that has been bullied and picked on a lot (aka the quiet kid ) if we could stop bullying we could decreese the number of school shootins by a lot

Explanation:

Answer:

False

Explanation:

At least in my assignment the correct answer was false.

Digital computers use a........ system to encode date and programs.

Answers

Answer:

Digital computers use a binary system to encode date and programs.

write a program that will create an array of 100 random integers in the range from [0,99] pass the array to a function, printarray(), that will print the values of the array on the monitor. pass the array to a function, sortarray(), that will sort the array. Pass the array to printarray() again and print it in increasing order

Answers

Answer:

In C++:

#include <cstdlib>  

#include <ctime>  

#include <iostream>

#include <bits/stdc++.h>

using namespace std;

void printarray(int array []){

for(int i=0; i<100; i++){         cout << array[i] << " ";    }

}

void sortarray(int array []){

sort(array, array + 100);

   printarray(array);

}

int main() {  

   int array[100];

   srand((unsigned)time(0));  

   for(int i=0; i<100; i++){  array[i] = (rand()%99);     }

   printarray(array);

   cout<<endl;

   sortarray(array);

   return 0;

}

Explanation:

See attachment for program source file where comments are used for explanation purpose

Other Questions
(HELP I BEG U THERE IS 20 MIN LEFT I NEED SLEEP AND I WILL GIVE BRAINLY ) According to the US Census, the percent of residents aged 65 or older in the 50states and District of Columbia has mean 13.26% and standard deviation of1.67%. Find and interpret the standardized scorefor the state of Colorado, whichhad 9.7% of residents age 65 or older. * 15. What must occur in order for genetic material to be passed to cells during cell division? A DNA replication B RNA synthesis C osmosis D diffusion Someone PLEASEEE HELP ME WITH THISSS What needs to be taken into consideration when increasing either the acid or base concentration in order to increase the buffering capacity of a solution? C3H8, + 5O2+ 5O2,3CO2 + 4H20If 2.50 moles of C3H8react, how many moles of H20 are produced? Part c Katie started with $40. How much money did she have left after purchasing the supplies? Enter your answer in the box provided. ihioiggihhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiik find the area of a circle whose diameter is 7cm In a sample of double stranded dna if 27% of the nitrogenous bases are thymine what percentage of nitrogenous bases are cytosine? Which is the smallest of the terrestrial planets?A. MercuryB. EarthC. VenusD. Mars please help, thanks What role did the National Security Council play in shaping containment? How did nuclear capability influence containment? Jackson is starting an exercise program.The first day he will spend 30 minute on a treadmill by 2 minutes each day.Write an equation for t(d),the time,in minutes,on the treadmill on day d a stock analyst wants to use a dividend pricing model to value stock. the analyst believes will pay its first dividend in exactly 15 years, and she is guessing that the dividend will be $10.00 per share at that time. the analyst assumes that dividends will grow by 5% per year going forward after year 15. the required return to hold is estimated to be 12% per year. based on these assumptions, what is the intrinsic value of stock today 9y - 2x = 0 in slope intercept form. 3. State if each statement is correct. If it is not correct, then fix the mistake.For three problems explanation and work neededSOON ASP!!!! please. Write a one-page letter to a loved one as if you were a soldier in WWI. Be sure to explain the things you are experiencing, seeing, feeling, and anything else you can think to add. DUE RIGHT NOW PLEASE HELP!!!!! An economist studying fuel costs wants to estimate the mean price of gasoline in her state on a certain day. On that day, she takes an SRS of 121212 gas stations and finds the sample mean price (in dollars per gallon) is \bar x=\$2.29 x =$2.29x, with, \bar, on top, equals, dollar sign, 2, point, 29 with a standard deviation of s_x=\$0.20s x =$0.20s, start subscript, x, end subscript, equals, dollar sign, 0, point, 20. The prices in the sample are roughly symmetric with no distinct outliers. Based on this sample, which of the following is closest to a 90\%90%90, percent confidence interval for the mean price of gasoline that day in her state?