Answer to Question #310296 in Python for Fe 1

Question #310296

Date format 2




Input



200



Output



3 minutes 20 seconds

1
Expert's answer
2022-03-14T10:31:09-0400
t = int(input())
hr = t // 3600
t = t % 3600
min = t // 60
sec = t % 60


if hr > 1:
    print(hr, 'hours', end=' ')
if hr == 1:
    print('1 hour', end=' ')


if min > 1:
    print(min, 'minutes', end=' ')
if min == 1:
    print('1 minute', end=' ')


if sec > 1:
    print(sec, 'seconds', end='')
if sec == 1:
    print('1 seconde', end='')


print()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS