- PiDay.java
Grader Results
x/x
Pass | Test | Message | |
---|---|---|---|
- | Test results will show here. | - |
Errors:
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!
Upload an image
Upload from your computer
Or paste a link here
Slides and Notes
No slides available for this video
About
Java (main)
Java Version 1.8.0_222
Upload Media
File URL:
Please use up-to-date Chrome or Firefox in order to use audio and video recordings in your programs. Uploading files and taking photos should still work in your current browser.