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
pogonyaev
2 years ago
5

One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input

, and outputs the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("%.2f", yourValue); Ex: If the input is:
Computers and Technology
2 answers:
Sedaia [141]2 years ago
6 0

Answer:

def miles_to_laps(miles):

  return miles / 0.25

miles = 5.2

num_of_lap = miles_to_laps(miles)

print("Number of laps for %0.2f miles is %0.2f lap(s)" % (miles, num_of_lap))

Explanation:

salantis [7]2 years ago
5 0

Answer:

import java.util.Scanner;

public class Miles {

public static void main(String[] args) {

   //initialization

       double Number_Miles;

       //print the message

       System.out.print("Enter the number of miles: ");

       Scanner scn1 = new Scanner(System.in);

       

       Number_Miles = scn1.nextDouble();  //read the input from user

       //calculate the laps

       double yourValue = Number_Miles/0.25;

       //display the output on the screen

       System.out.printf("%.2f", yourValue);

     

}

}  

Explanation:

First import the library Scanner than create the class and define the main function. In the main function, declare the variables.

print the message on the screen and then store the value enter by the user into the variable.

Scanner is a class that is used for reading the output. So, we make the object of the class Scanner and then object call the function nextDouble() which reads the input and store in the variable.

After that, calculate the number of laps by dividing the number of miles with the given one lap running track value (0.25 miles).

Number\,of\,laps = \frac{Number\,of\,miles}{0.25}

the output is stored in the variable.

After that, print the value on the screen with 2 digits after the decimal point.

we can use "%.2f" in the printing function in java.

like System.out.printf("%.2f", output);

You might be interested in
A ___________ is similar to an intranet in that it uses internet technologies, but is developed for users outside the organizati
Vanyuwa [196]
The blank is extranet
I hope this helped!
6 0
2 years ago
Explain two ways of searching information using a search engine.​
lozanna [386]

answer:

navigational search queries · for example, “how to make cake?”

informational search · for example, “y-o-u-t-u-b-e” or “apple"

explanation:

  • navigational — these requests establish that the user wants to visit a specific site or find a certain vendor
  • informational — in these instances, the user is looking for certain information
5 0
2 years ago
What are important requirements for a frame of reference to identify an object's location, and to communicate that location to a
gogolik [260]

Answer:  Set a scale, or method of determining distance, within your system. Identify an origin near an object—specifically something fixed.

Explanation:

4 0
2 years ago
How does the rhythm of "The Raven" compare to "Casey at the Bat?"
katen-ka-za [31]

Answer:

Casey at the Bat: A Ballad of the Republic Sung in 1888' is the full title of an American poem written by Ernest Lawrence Thayer. The poem tells the story of the final half-inning of a baseball game. ... Not only is it a love song to the dramatic sport of baseball, but it is a ballad to 'the Republic in 1888'.

8 0
3 years ago
Amanda is negotiating a new applicant tracking service for her department with a software vendor. She intends to make the first
maria [59]
Idk the answer but my name is Amanda so I felt like I should comment. Good luck tho
8 0
3 years ago
Other questions:
  • Suppose we have a relation schema R(A, B, C) with FD A rightarrow B. Suppose also that we decide to decompose this schema into S
    10·1 answer
  • The IT infrastructure components should be evaluated based on their expected financial value. All of the following are used to q
    15·1 answer
  • 1 megabyte is equal to 1024 gigabyte. True/False​
    11·2 answers
  • What is output?
    5·1 answer
  • 4. Give name=
    11·1 answer
  • This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balance
    5·1 answer
  • It takes 2.5 yards of material to make a dress harleys clothing design estimates that they can produce 48 dresses each week.if t
    15·2 answers
  • Match the job description to the level of degree it requires.
    15·1 answer
  • Generally speaking, what is a “best practice"?
    13·1 answer
  • Anyone use zoom<br><br>code:- 2574030731<br>pass:- HELLO<br>Z●●M ​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!