📜  WAP 询问用户几年,然后打印出该号码中的天数、小时数、分钟数和秒数.多年. - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:31.885000             🧑  作者: Mango

代码示例1
y = float(input("How many years? "))

d = y * 365
h = d * 24
m = h * 60
s = m * 60

print(y, "years is:")
print(d, "days")
print(h, "hours")
print(m, "minutes")
print(s, "seconds")