# Distance.py Copyright (c) 2006 Kari Laitinen
# http://www.naturalprogramming.com
# 2006-05-28 File created.
# 2006-05-28 Last modification.
# Python 'understands' the same format specifiers (e.g. %f)
# as the Java printf() method and the C prinf() function.
# Operator % is used between the string that contains
# the format specifier and the value that will be put
# in place of the format specifier. (In this use % can be
# called the string formatting operator. % is also the
# remainder (modulo) operator in Python.)
# If there are several format specifiers in a string,
# the corresponding values must be given inside
# parentheses. A list of values inside parentheses form
# a tuple.
print "\n This program converts meters to other units of" \
"\n distance. Please, enter a distance in meters: ",
distance_in_meters = float( raw_input() )
distance_in_kilometers = distance_in_meters / 1000.0
distance_in_miles = 6.21371e-4 * distance_in_meters
distance_in_yards = 1.093613 * distance_in_meters
distance_in_feet = 3.280840 * distance_in_meters
distance_in_inches = 12 * distance_in_feet
distance_in_light_years = distance_in_meters / \
( 2.99793e8 * 365 * 24 * 3600 )
print "\n %f meters is: \n" % distance_in_meters,
print "%15.3f kilometers\n" % distance_in_kilometers,
print "%15.3f miles \n" % distance_in_miles,
print "%15.3f yards \n" % distance_in_yards,
# The following statement occupies two program lines. A backslash
# is not needed here because a comma separated list of values
# may continue on the following line.
print "%15.3f feet \n%15.3f inches \n" % ( distance_in_feet,
distance_in_inches ),
print "%15.5e light years \n" % distance_in_light_years,