Code 51: Convert Seconds into Days, Hours, Minutes and Seconds | Datetime Module | 365 days of Code

preview_player
Показать описание
Here is the python program to convert Seconds into Days, Hours, Minutes and Seconds.
Code -
def convert_seconds(seconds):
days = seconds//(24*3600)
seconds %= (24*3600)
hours = seconds//3600
seconds %= 3600
minutes = seconds//60
seconds %= 60
print("Days:",days,", Hours:", hours,",Minutes:", minutes,", Seconds:", seconds)
convert_seconds(97610)
Рекомендации по теме
Комментарии
Автор

Given two inputs
200
86400
Given inputs are in seconds
Output should be
3 minutes 20 seconds
1days


Note I am able to get output individually but i need both at same time plz tag me in comments n reply

sairam-nnjv