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
When measuring processor speed,a megahertz is much faster than a gigahertz.true or fals
Nat2105 [25]

Answer: False

Explanation:

The statement in the question is wrong. When measuring processor speed, a megahertz is slower than a gigahertz.

We should note that:

1 megahertz = 1 million cycles per second

1 gigahertz = 1 billion cycles per second.

Therefore, we can see that a gigahertz is faster than a megahertz.

4 0
3 years ago
Match the items with their respective descriptions.
kap26 [50]

a is 3

b is 1

c is 2

d is 4

7 0
3 years ago
Read 2 more answers
i need help or good site for my project topic: identification of problems hindering effective teaching and learning of computer
attashe74 [19]

Answer:

they learn how to be independent

and how to create their website at the young age and who make money and create jods

like me I'm learning IT at katlehong secondary school

and I'm now to create my website

4 0
3 years ago
A ______ object is used for displaying the results of a question based on stored data.
Sphinxa [80]
The answer would be C
3 0
3 years ago
Read 2 more answers
As the Sunrise hospital implements an EHR, the coding staff requests a new system that will enhance productivity, accuracy, and
Eva8 [605]

Answer:

D. Computer assisted coding

Explanation:

A Computer Assisted Coding System is a software that scans medical documents and generates codes that are appropriately designed for key phrases and terminology in the document. This system is used to enhance productivity, accuracy and efficiency. It can identify when there is a diagnosis of a certain ailment or just used as it is in the family history. It has several advantages over manual coding and even helps identify mistakes made by manual coding.

7 0
3 years ago
Other questions:
  • Given three dictionaries, associated with the variables, canadian_capitals, mexican_capitals, and us_capitals, that map province
    11·1 answer
  •   Why does a shaded-pole motor run at a constant speed?  A. The lines of force do not change direction.  B. The current through
    15·1 answer
  • Which step comes between identifying i need and generating ideas in a technological design process
    10·1 answer
  • What kind of device is hardware capable of transferring items from computers t and devices to trans?
    5·1 answer
  • A _____ is a control that tells the computer what task to perform.
    6·1 answer
  • Difference between primary key and foreign key
    12·1 answer
  • Select the correct locations on the image. Adrian wants to delve into database administration. Which certifications would help h
    5·1 answer
  • Example of vector image format​
    12·1 answer
  • Open a Python interpreter. Python can show you the set of currently known names if you type dir(). While these values may vary f
    7·1 answer
  • Briefly describe the function of options in a linux command and give an example of a useful option.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!