Skip to content

Instantly share code, notes, and snippets.

@cwake
Last active August 29, 2015 14:13
Show Gist options
  • Save cwake/0ce89f7a1a36bc9412e8 to your computer and use it in GitHub Desktop.
Save cwake/0ce89f7a1a36bc9412e8 to your computer and use it in GitHub Desktop.
Chloe's Time Conversion Program
# Chloe's time conversion. Converts seconds to minutes and hours
print("Chloe's time conversion program: converts seconds into minutes and hours.")
seconds = int(input("Enter any number of seconds to convert to both minutes and hours: "))
minutes = seconds / 60 #60 seconds in a minute
hours = minutes / 60 # 60 minutes in a hour
print(str(seconds) + ' seconds is ' + str(minutes) + 'minutes.') # prints minutes conversion
print(str(seconds) + ' seconds is ' + str(hours) + 'hours.') # prints hours
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment