Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

The Nature of Nonverbal Communication

Answered: 1 week ago

Question

Functions of Nonverbal Communication

Answered: 1 week ago

Question

Nonverbal Communication Codes

Answered: 1 week ago