# Answer to Question #55330 in Python for Ryan Thomas

Question #55330

i need to write a code in python that asks for a number of days and then show the hours, minutes and seconds are in the number of days. If you could help it would be greatly appreciated

Expert's answer

# Python 3.4.x

print("Input number of days: ", end="")

days = int(input())

print("There are", days * 24, "hours,",

days * 1440, "minutes,", days * 86400, "seconds.")

# Python 2.7.x

from __future__ import print_function

print("Input number of days: ", end="")

days = int(raw_input())

print("There are", days * 24, "hours,",

days * 1440, "minutes,", days * 86400, "seconds.")

print("Input number of days: ", end="")

days = int(input())

print("There are", days * 24, "hours,",

days * 1440, "minutes,", days * 86400, "seconds.")

# Python 2.7.x

from __future__ import print_function

print("Input number of days: ", end="")

days = int(raw_input())

print("There are", days * 24, "hours,",

days * 1440, "minutes,", days * 86400, "seconds.")

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment