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
Ket [755]
3 years ago
11

Write a program to display MPH (Miles per Hour). Create a function to calculate the MPH. Ask the user for the number of miles dr

iven 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.
Computers and Technology
1 answer:
puteri [66]3 years ago
7 0

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

<em>else:</em>

<em>    print("Positive inputs only")</em>

You might be interested in
Draw a flowchart to compute sum A=10 &amp; B=20​
Tamiku [17]

Answer: i add the asnwer

Explanation:

7 0
3 years ago
A network administrator is implementing multifactor authentication for employees who travel and use company devices remotely by
devlian [24]

Answer:

A networking administrator is a multi-factor authentication for employees who use company devices by using a VPN. The level of authentication is 802.1X and OTP.

Explanation:

Network administration is the computer network and uses multiple computers. A company and organization uses multiple computers and need a network admin to connect with a different system. Network administrators depend upon the organization. Some duties of the network administration are split and clearly defined such as

Configure the network hardware, servers, and routers

Upgrade the computer networks

Troubleshooting network issues

Assigning the network models

Deploying the software

Managing the servers

Implementing the security and measure

Network administration requires technical competence and will benefit as a network administrator.

For the level of authentication 802.1, X and OTP are suitable for network administration.

5 0
3 years ago
Lianna is an Information Technology professional. She usually spends her days creating custom programs for her company by writin
marusya05 [52]
Liam a would need to contact the software developer. So the answer is B
6 0
3 years ago
Suh my lil cuddys.... tell me what ur favorite candy is.....
LenKa [72]

Answer:

ok imma little scared, but my fav candy would have to be reeses peanut butter cups or hershey's with almonds.

8 0
3 years ago
What might happen if Python code is not in the correct order? The computer will fix the steps automatically. The computer will f
Vesna [10]

Answer:

The computer will follow the steps, but the program might not work.

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which network type connects each computer and device to a central device?
    5·1 answer
  • A sentinel value ________ and signals that there are no more values to be entered:____
    14·1 answer
  • Linux would be a good example of?
    6·1 answer
  • What is your understanding about the subject “digital image processing”?
    14·1 answer
  • Can you help me, please
    10·1 answer
  • What is the answer 11100+01010​
    8·1 answer
  • Look at the following partial class definition, and then respond to the questions that follow it:
    12·1 answer
  • Why crt and plasma are not used in laptop ?​
    14·1 answer
  • Can someone send me reference on communication, importance , communication cycle , pros and cos​
    15·1 answer
  • when using screwdrivers you should always be aware that the screwdriver blade might slip out of the slot and strike you in the .
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!