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
If a user has one column in a table and would like to make it into two columns, which command should be used?
Vesna [10]
Split cells.

This answer needs to be twenty characters long to qualify so here is this useless sentence.
4 0
4 years ago
An example of a current disruptive technology is a?
guapka [62]
Smart Watches are taking over normal watches. They are getting WAYYY cheaper. There is one for about $14
6 0
3 years ago
Read 2 more answers
____ storage is not recommended for long-term archiving because the storage media can degrade over time
Lunna [17]

Hard Drive is not recommended for long-term archiving because the storage media can degrade over time,

<h3>What type of storage is recommended for long term data retention?</h3>

The long method used to long-term retention is the use of cloud. Cloud-based are known to be a form of cold storage that is made up of intelligent storage software.

Note that Hard Drive is not a long term kind of storage in the above context and as such, PE storage is not recommended for long-term archiving because the storage media can degrade over time,

Learn more about storage from

brainly.com/question/1317328

#SPJ1

5 0
3 years ago
Suppose a byte-addressable computer using set-associative cache has 2 16 bytes of main memory and a cache size of 32 blocks and
melisa1 [442]

Answer:

Following are the responses to these question:

Explanation:

The cache size is 2n words whenever the address bit number is n then So, because cache size is 216 words, its number of address bits required for that  cache is 16 because the recollection is relational 2, there is 2 type for each set. Its cache has 32 blocks, so overall sets are as follows:

\text{Total Number of sets raluired}= \frac{\text{Number of blocks}}{Associativity}

                                               =\frac{32}{2}\\\\ =16\\\\= 2^4 \ sets

The set bits required also are 4. Therefore.

Every other block has 8 words, 23 words, so the field of the word requires 3 bits.

For both the tag field, the remaining portion bits are essential. The bytes in the tag field are calculated as follows:

Bits number in the field tag =Address Bits Total number-Set bits number number-Number of bits of words

=16-4-3

= 9 bit

The number of bits inside the individual fields is therefore as follows:

Tag field: 8 bits Tag field

Fieldset: 4 bits

Field Word:3 bits

3 0
3 years ago
```{r}
Stells [14]
Know what your trying to say her input pound 45-94
4 0
3 years ago
Other questions:
  • The _______ displays the name of the open file and the program.
    13·1 answer
  • Which references are updated when you copy the formula =$E6-MAX(H$1:J4)
    10·1 answer
  • When should you use an electronic spreadsheet
    9·1 answer
  • can Results shown at the top of the Google search engine results page (SERP) always get high Needs Met ratings
    10·1 answer
  • You compared each letter in the correct word to the letter guessed.
    5·1 answer
  • Who is the founded the java computer language?​
    5·1 answer
  • Why does brainly say im in highschool when im in middle school?
    15·2 answers
  • Write the pseudocode for a program that will process attendance records of CA students. The students attend college five days a
    13·1 answer
  • Which option is designed by software engineers?
    9·1 answer
  • One of the users in your company is asking if he can install an app on his company-provided mobile device. The installation of a
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!