Question
On a planet in our solar system, a year is the amount of time it takes for the planet to revolve around the Sun. The
On a planet in our solar system, a year is the amount of time it takes for the planet to revolve around the Sun. The Earth revolves around the Sun in one Earth year. Other planets take shorter or longer periods to revolve around the Sun.
We can use a simple formula (based on Keplers Third Law) to calculate the length of a year on another planet in Earth years.
pyears = sqrt(distance ^ 3)
where:
pyears: number of Earth years for the planet to revolve around the Sun
distance: distance of planet from Sun in Astronomical Units (AUs)
Note: the Earth is exactly one AU from the Sun.
Assignment
Write a program that asks the user for the name of a planet and the distance of that planet from the Sun in AUs. The program should than calculate a year on that planet in Earth years and output the information to the user. Use user friendly prompts. Be sure to include a comment at the beginning of the program with your name, date, and a short description of the program.
Additional Information
Heres some information about the solar system to help test your program.
Planet: Mercury
Distance:0.39
Planet:Venus
Distance: 0.723
Planrt: earth
Distance: 1.0
Please do only flowchart showing the logic. INPUT, Process, and OUPUT. no programming language needed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started