首页 > 代码库 > 小甲鱼python视频第三讲(课后习题)

小甲鱼python视频第三讲(课后习题)

1.注意这两个代码的区别

a = 3b = a b = 4print(b)
a = 3b = aa = 4print(b) 

(在 python中,变量只是贴标签)

 2.

str  = r"C:\\w\e\we\weee""\\"print("str")

 

3.(版本2.7)

month = int(raw_input("请输入月数:"))day = int(raw_input("请输入天数:"))hour = int(raw_input("请输入小时数:"))minute = int(raw_input("请输入分钟数:"))second = int(raw_input("请输入秒数:"))result = 30*24*60*60*month + 24*60*60*day + 60*60*hour + 60*minute + secondprint(result)

 

小甲鱼python视频第三讲(课后习题)