摘要: 3.19 import time current_time = time.localtime() formatted_time = time.strftime("%Y-%m-%d", current_time) print("当前日期:", formatted_time) 3.20 import t 阅读全文
posted @ 2025-03-30 20:07 飕飕 阅读(8) 评论(0) 推荐(0)
摘要: 3.1 current_weight = float(input('当前体重kg:')) for i in range(1,11): current_weight += 0.5 moon_weight = current_weight*16.5/100 print('第{:.0f}年,地球体重{:. 阅读全文
posted @ 2025-03-23 20:04 飕飕 阅读(22) 评论(0) 推荐(0)
摘要: 温度转换 TempStr = input("请输入带有符号的温度值:") if TempStr[-1] in ['f','F']: C = (eval(TempStr[0:-1]) - 32)/1.8 print("转化后的温度是{:.0f}21c" "C".format(C)) elif Temp 阅读全文
posted @ 2025-03-16 20:30 飕飕 阅读(17) 评论(0) 推荐(0)
摘要: 温度转换 TempStr = input("请输入带有符号的温度值:") if TempStr[-1] in ['F', 'f']: C = (eval(TempStr[0:-1]) - 32)/1.8 print("转换后的温度是{:.2f}C".format(C)) elif TempStr[- 阅读全文
posted @ 2025-03-16 20:20 飕飕 阅读(24) 评论(0) 推荐(0)
摘要: 1.1 str1 = input ("请输入一个人的名字:") str2 = input ("请输入一个国家名字:") print ("世界这么大, {} 想去 {} 看一看.".format (str1, str2)) 1.2 n = input ("请输入整数N:") sum = 0 for i 阅读全文
posted @ 2025-03-09 21:54 飕飕 阅读(35) 评论(0) 推荐(0)
摘要: https://python123.io/images/ab/25/267eac2bbecd4446c231d7bc8c95.jpg https://python123.io/images/3e/44/7a9d4e29227821750aed9dad1c2b.jpg https://python12 阅读全文
posted @ 2025-03-03 12:42 飕飕 阅读(7) 评论(0) 推荐(0)