Question
Write Python script to input a time duration in seconds and display it in the following : ____________ Seconds = _____ hr ________ min _______ seconds. For example, if the user input is 4526, the output should be: 4526 seconds = 1 hr 15 min 26 seconds

Answer

"' Script to Convert Seconds into hours, minute and seconds '''
S =int(input("Enter the Temperature in Celsius"))
print(S," seconds =",end=’ ‘)
H=S//3600
M=S%3600
S =M%60
M=M//60
print(H,"hr",M," min", S, "seconds")

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free