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
3 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]3 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]3 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
program students can get credit for their high school classes as long as they take a specific courses that a college will accept
USPshnik [31]

AP courses deliver college credits

4 0
3 years ago
Read 2 more answers
Define Turbo C++ and how is the use of Turbo C++.?
anyanavicka [17]

Answer:

Turbo C++ is a Compiler and Integrated development Environment (IDE) and Computer language

Explanation:

  1. Turbo C++ is a IDE which is used for writing the programs.
  2. This editor is used to create the source file, compile and run the source file and then execute it

6 0
3 years ago
The scientific process is most similar to what
Papessa [141]

Answer:

A dyagram

Explanation:

Have a nice day.

-London

8 0
3 years ago
I need help with this problem please
alina1380 [7]

Answer:

i think its d

8 0
3 years ago
What is also known as a visual aid in a presentation
kari74 [83]

the answer is slide

I took notes off of plato and it quoted word for word

A slide is a visual aid, also known as a single screen of presentation

:) hope this helps

5 0
3 years ago
Read 2 more answers
Other questions:
  • You are training to complete in a local 5K run. You record your time scores in minutes after completing seven practice runs. Wri
    5·1 answer
  • Which osi reference model layer includes all programs on a computer that interact with the network?
    13·1 answer
  • Lesson 15: Integrated Literacy Connections Education Introduction to Computer Applications Unit 6: Internet Safety
    5·1 answer
  • What is a quick way to close the header or footer view in a microsoft word document?
    12·1 answer
  • What port in your computer will you use to plug in your camera?
    14·2 answers
  • Which of the following is NOT considered a step in the problem solving process. A Try B Discover C Prepare D Define
    12·1 answer
  • A technician is assigned a task to configure a new server with six hard drives. The senior administrator requested the technicia
    13·1 answer
  • Technology trends in education play a key role in a student’s
    15·1 answer
  • Which term is used in object-oriented programming to reference characteristics of an object?
    15·1 answer
  • How many bits would be needed to count all of the students in class today?There are 25 in class
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!