Computer Science, asked by jaxdefilippis, 3 months ago

Write a program that asks the user to enter a number of seconds (whole number, you must verify this). If it is not a number, write a warning message. If the input is a whole number, print the time in seconds, minutes, hours, and days. The responses of the program will vary depending on the length of seconds:

Answers

Answered by nkachhap846gmailcom
1

Answer:

this is your answer

Explanation:

program that asks the user for a number of seconds

'''

Seconds = int(input('Enter seconds: ') #asks user to enter seconds

'''

Convert seconds to minutes using the if statements

'''

if Seconds >= 60 and Seconds <= 3600:

print('Minutes: ', Mins)

Mins = Seconds / 60

elif Seconds >= 3600 and Seconds < 86400:

print('Hours: ', hrs)

hrs = Seconds/3600 #Converting to hours

elif Seconds >= 86400:

print('Days: ', days)

days = Seconds/86400

else:

print('Seconds: ', Seconds)

Help in make this work please. Thank you

Similar questions