0

I'm not requesting a solution... I simply do not understand what this instructor is requesting with this assignment.

"Light travels at 3 * 108 meters per second. A light-year is the distance a light beam travels in one year. Write a program that calculates and displays the distance of a user-entered light-year."

It clearly states that a light year is a unit of distance, yet the instructor wants me to write a program in Python3 that calculates the distance of a user-entered light year??? I don't understand if the calculated distance of a LY is to be converted>displayed in LY, Statute Miles, Nautical Miles, Kilometers, Parsecs... etc.

It seems incomplete to me and I have received nothing from the instructor when asked for clarification.

Thanks!

jc allen
  • 103
  • 2

1 Answers1

3

I would guess it is intended to be "a user-entered number of light-years." You are then supposed to take in a number of light years and convert that distance to some other unit. As the other unit is not specified, I would use the SI unit of meters.

Ross Millikan
  • 374,822
  • My first thought as well was to write a code for conversion from user-entered LY to an output in Kilometers to keep everything metric but for some reason that just doesn't (pardon the pun) compute in my brain for writing code. – jc allen Mar 04 '19 at 00:13
  • 1
    Once you choose your output unit, you just need to multiply by the conversion factor, which you can precompute and hard code. Meters are metric, too. – Ross Millikan Mar 04 '19 at 00:18
  • Thanks for the responses Ross; I'll work my way through it. I just needed someone else to look at it to reassure myself that I wasn't crazy... – jc allen Mar 04 '19 at 00:22