Created
October 12, 2019 15:22
-
-
Save Shogun89/57f368dff40c78ffd7bb48bce10c161e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def convert_km_to_miles(distance): | |
miles = distance/1.60934 | |
return miles | |
min_distance = 54.6*10**6 | |
max_distance = 401*10**6 | |
avg_distance = 225*10**6 | |
distances = [min_distance, max_distance, avg_distance] | |
distances_miles = list(map(convert_km_to_miles, distances)) | |
print(distances_miles) | |
def convert_to_seconds(distance): | |
time = distance/186282 | |
return time | |
times = list(map(convert_to_seconds, distances_miles)) | |
print(times) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment