Question: 3. ISubmit on zy Labsl Write a function called orbit that takes three inputs and returns two outputs. Our function is related to a planet

 3. ISubmit on zy Labsl Write a function called orbit that
takes three inputs and returns two outputs. Our function is related to

3. ISubmit on zy Labsl Write a function called orbit that takes three inputs and returns two outputs. Our function is related to a planet that is in orbit around a star. Remember that planets have elliptical orbits, like this Image from https://upload wikimedia org wikipedia commons a Picture of an elliptical oebit ipg An ellipse has two measurements that we can use define it. Those are the major axis radius (a in the picture) and the minor axis radius (b in the picture below) Your function should take information about your planet's orbit and tell us how long that orbit will take Your three inputs should be: The major axis radius, major The minor axis radius, minor - The planet's orbital velocity, velo, in meters per second Your outputs should be the length of one year on that planet, in days, using two approximations for the perimeter of an ellipse A circular approximation, cire Year Using Ramanujan's approximation, ramYear This means that when you call your function, it should have the form: circTime, ramTime)-orbit (major, minor, velo) The circular approximation is: perimeter ~ 2 perimeter 13(a + b)- V(3a+ b)(a+3b)] Note that those equations give you perimeters. To calculate the time it takes to travel that distance, you have to divide a perimeter by a velocity. Then remember to convert the time to the correct units (days). To test your code, use these inputs: Input a (km) b (km) v (km/s) Earth Data 149600000 149580000 29.78 You should find Output TI T2 Standard Soln. 3.6529522524793302+02 3.652952248398216e+02 Note that earth's orbit is indeed very close to a circle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!