题目:
1.
2.
解题过程:
1.
"""计算年数和天数"""
minute = int(input("请输入分钟数:"))
hours = minute // 60
days = hours // 24
years = days // 365
last_days = days % 365
print(f"{minute}分钟可转化为{years}年{last_days}天")
运行结果:
2.
"""科学:计算能量"""
M = float(input("请输入水的质量:"))
initialTemperature = float(input("请输入初始温度:"))
finalTemperature = float(input("请输入最终温度:"))
Q = M * (finalTemperature - initialTemperature) * 4184
print(f"所需的能量为{Q}")