摘要: P124 3.19 import time current_time = time.strftime("%Y-%m-%d", time.localtime()) print(current_time) 3.20 import time date1 = time.strftime("%Y-%m-%d" 阅读全文
posted @ 2025-03-29 15:49 Neflibata。 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 1.重量计算 initial_weight = 60 yearly_gain = 0.5 moon_factor = 0.165 for year in range(1, 11): earth_weight = initial_weight + yearly_gain * year moon_wei 阅读全文
posted @ 2025-03-23 16:20 Neflibata。 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 2.1 TempStr = eval('input("请输入带有符号的温度值:")') if TempStr[-1] in ['F', 'f']: C = (eval(TempStr[0:-1]) - 32)/ 1.8 print("转换后的温度是{:.0f}C".format(C)) elif T 阅读全文
posted @ 2025-03-16 19:40 Neflibata。 阅读(3) 评论(0) 推荐(0) 编辑
摘要: TempConvert.py TempStr = input("请输入带有符号的温度值:") if TempStr[-1] in ['F','f']: C = (eval(TempStr[0:-1]) - 32)/1.8 print("转换后的温度是C{:.2f}".format(C)) elif 阅读全文
posted @ 2025-03-16 13:27 Neflibata。 阅读(6) 评论(0) 推荐(0) 编辑
摘要: str1 = input("请输入一个人的名字:") str2 = input("请输入一个国家名字:") print("世界这么大,{}想去{}看看 .".format(str1,str2)) n = input("请输入整数N:") sum = 0 for i in range(int(n)): 阅读全文
posted @ 2025-03-09 13:49 Neflibata。 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 报告 https://img2024.cnblogs.com/blog/3608519/202503/3608519-20250301142802162-1802955890.png 阅读全文
posted @ 2025-03-02 21:24 Neflibata。 阅读(6) 评论(0) 推荐(0) 编辑
摘要: import turtle turtle.setup(500,500) turtle.bgcolor("white") turtle.pensize(2) turtle.color("red") turtle.begin_fill() for _ in range(5): turtle.forwar 阅读全文
posted @ 2025-02-24 16:27 Neflibata。 阅读(12) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示