Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert_seconds(seconds):
- minute_count = 0
- hour_count = 0
- remaining_seconds = int(seconds)
- #while remaining_seconds >= 3600:
- while remaining_seconds / 3600 > 0:
- hour_count += 1
- remaining_seconds = remaining_seconds - 3600
- while remaining_seconds / 60 > 0:
- minute_count += 1
- remaining_seconds = remaining_seconds - 60
- return hour_count, minute_count, remaining_seconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement