Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Read a number from the user in the terminal. This number will be the distance from the Earth to the Sun in miles. (This

1. Read a number from the user in the terminal. This number will be the distance from the Earth to the Sun in miles. (This number does not have to be real but make it larger than one million).

2. Convert that number to an integer.

3. Use that value to calculate the same distance in kilometers (save to a variable). Print out this value. (This variable should be a floating point). (Hint: there are 1.6 kilometers in a mile.)

4. Use the kilometers variable to calculate the distance in astronomical units (AU). Print out this value. (Hint: there are 150,000,000 kilometers in 1 AU.)

5. Calculate the distance in lightyears. Print out this value. (Hint: there are 5.88x10^12 miles in 1 lightyear.) (python code also having to use integers.)

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

Recommended Textbook for

Data Science Project Ideas In Health Care Volume 1

Authors: Zemelak Goraga

1st Edition

B0CPX2RWPF, 979-8223791072

More Books

Students also viewed these Databases questions

Question

e. Compute P(0.25 Answered: 1 week ago

Answered: 1 week ago

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago