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
1
Expert's answer
2015-10-08T02:40:58-0400
# 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.")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS