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
frosja888 [35]
3 years ago
8

One lap around a standard high-school running track is exactly 0.25 miles. Write the function miles_to_laps() that takes a numbe

r of miles as an argument and returns the number of laps. Complete the program to output the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value))
Ex: If the input is: 2.2 the output is: 8.80 Your program must define and call the following function: def miles_to_laps(user_miles)
Computers and Technology
1 answer:
lana [24]3 years ago
4 0

Answer:

def miles_to_laps(user_miles):

   laps = user_miles / 0.25

   

   return laps

 

miles = float(input("Enter number of miles: "))

print('{:.2f}'.format(miles_to_laps(miles)))

Explanation:

Create a function named miles_to_laps that takes one parameter, user_miles

Inside the function, calculate the number of laps, divide the user_miles by 0.25 (Since it is stated that one lap is 0.25 miles). Return the laps

Ask the user to enter the number of miles

Call the function with that input and print the result in required format

You might be interested in
Pleassseeeee helppp!!!!
AnnZ [28]

Answer:

html

Explanation:

6 0
2 years ago
you where discussing software piracy with a friend and were surprised to learn how software piracy can impact your life every da
umka2103 [35]
Ahh, software. What is software piracy?
.
Ok... so it sounds evil.
.
BECAUSE IT IS!!
.
Software piracy can get you and suspected accomplices in court.
.
Fines up to a million dollars and lots of jail time.
.
Lots.
.
And lots.
.
But an effect of software piracy is that the software stealer himself earns money...
.
illegaly.
7 0
3 years ago
You can be sentenced to up to 180 days in jail for driving with a license that was suspended for _________ .
Yanka [14]

Answer:c\

Explanation:

4 0
3 years ago
1.) How do parks and other green spaces benefit a community?
vagabundo [1.1K]
#1 is A and #2 is B, but I don't know about #3 and #4.
8 0
2 years ago
In 2009 to 2010, how many social network users were reported as being victims of online abuse?
Dafna1 [17]
The answer is B because being victims of online abuse is not important
7 0
3 years ago
Read 2 more answers
Other questions:
  • How do you read a column
    8·1 answer
  • A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.
    14·1 answer
  • Which buttons should you use to publish and change a message on a message board
    6·2 answers
  • Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in t
    6·1 answer
  • ____________ hackers break into systems legally for non-malicious reasons such as to test system security vulnerabilities
    7·2 answers
  • function calculate () { var s = 2; var x = 2; var y = 3; if (x > 4) { s=s+ 2; } else if ( y > 4) { s=s+ 4; } else { s+=3;}
    11·1 answer
  • 4.17 LAB: Varied amount of input data ( C++)
    5·1 answer
  • Piers wants to take a course on XML. He is a certified web designer, but he has not used XML before. How can he use XML to impro
    8·1 answer
  • What is the highest numeral in a binary code?
    5·1 answer
  • In two to three sentences, define "home row" and explain why it is important.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!