Status: Not Started
  • PiDay.java
Font Size
14
Parentheses autocomplete
Wrap lines
Editor
Theme
Code with blocks by default
Console Font Size
12
Console Theme
Display Server Graphics Screen
Show File Tab Bar
Debug Mode
7 Circumference with 5 Digits of Pi
PiDay.java
public class PiDay
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Pass Test Message

Errors:

This student is viewing this assignment in English. View this page in English?

5 points

For this exercise, you are going to build on your previous code, so start by copying the code from the Calculate the Best Circumference exercise.

We are going to do one sample calculation with Pi rounded to 5 digits. Using the previous example to guide you, round Pi to 5 digits and use it to calculate the circumference of the ISS orbit.

You will then print out the calculated circumference as well as the difference between the best circumference minus the current circumference.

Finally, print out the percent error. The formula for percent error will be difference / BEST * 100.

Here is a sample output for Pi rounded to 2 digits. You will calculate Pi rounded to 5 digits.

Best Circumference: 26467.918106494006 miles
Current Circumference: 26454.5 miles
Difference: 13.41810649400577 miles
Percent Error: 0.050695738289720585%

Note: Be sure to copy your code before moving on to the next exercise!

Reset Code

Slides and Notes

No slides available for this video

About

Java (main)
Java Version 1.8.0_222

Upload Media