kelbeyhuebner1864 kelbeyhuebner1864
  • 10-11-2020
  • Computers and Technology
contestada

Write a Python script that prompts the user to enter a number of seconds. Then, calculate the number of hours and minutes and print the result

Respuesta :

Cytokine
Cytokine Cytokine
  • 10-11-2020

secs= int(input("Enter a number of seconds: "))

if secs >= 3600:

   hours = (secs/60)/60

   print("There are {} hour(s) and {} min(s)".format(hours,((hours*60*60)-secs)/60))

else:

   mins = secs /60

   print("There are {} min(s)".format(mins))

I hope this helps!

Answer Link

Otras preguntas

a rocket speed is 2 1/3 miles per second. how fast is this in miles per hour?
a confectioner has 500 mint, 500 orange, and 500 strawberry flavored sweets. He wishes to make packets containing 10 mint, 5 orange, and 5 strawberry sweets.
What is the least common multiple of 36 and 45
How do landforms affect life on Earth?
What is the average number of books per shelf in a number of 14,588 books and 313 equal size shelf?
Translate sentence into a equation fifteen more than half a number is 9.
How do you divide 33 photos into two groups so the ratio is 4 to 7?
Agriculture Industry- What was happening to farm income during the 1920's?
The new Coat and Jacket Store was ready to open. The workers put out 42 racks of men’s and boy’s coats and jackets with 16 items on each rack. They also put out
What is the plural of loaf