摘要: import pygame import random import copy import sys import math 初始化pygame pygame.init() 设置屏幕大小 screen_width, screen_height = 500, 500 screen = pygame.d 阅读全文
posted @ 2025-06-17 16:26 渔樵伴夜归客 阅读(9) 评论(0) 推荐(0)
摘要: 第13周 import random def printIntro(): print("这个程序模拟两个选手A和B的乒乓球竞技比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)") def getInputs(): a = float(input("请输入选手A的能力值(0 阅读全文
posted @ 2025-05-25 20:23 渔樵伴夜归客 阅读(24) 评论(0) 推荐(0)
摘要: 264页作业 作业7.1 import tokenize import keyword from io import BytesIO def convert_python_file(source_path, target_path): with open(source_path, 'rb') as 阅读全文
posted @ 2025-05-18 19:01 渔樵伴夜归客 阅读(13) 评论(0) 推荐(0)
摘要: 5.1 def drawaq(n): line = 3n+1 for i in range(1,line+1): if i%3 == 1: print(n"+ ",end="") print("+") else: print("| "*n,end="") print("|") n = eval(in 阅读全文
posted @ 2025-04-20 19:15 渔樵伴夜归客 阅读(37) 评论(0) 推荐(0)
摘要: 习题4.1 target = 425 guess = 0 F = 1 while guess != target: guess = eval(input("请输入一个猜测的整数(1至1000):")) if guess > target: print("猜大了") F += 1 elif guess 阅读全文
posted @ 2025-04-06 18:38 渔樵伴夜归客 阅读(13) 评论(0) 推荐(0)
摘要: 习题3.19 import time t = time.gmtime() print(time.strftime("%Y-%m-%d",t)) 习题3.20 import time t = time.gmtime() print(time.strftime("%Y-%m-%d",t)) print( 阅读全文
posted @ 2025-03-30 18:57 渔樵伴夜归客 阅读(27) 评论(0) 推荐(0)
摘要: 3.1 xo=50 x=0.5 for year in range(1,11): earthweight=xo+xyear moonweight=earthweight0.165 print(f"{moonweight:.2f}") print(f"{earthweight:.2f}") 3.2 a 阅读全文
posted @ 2025-03-23 19:25 渔樵伴夜归客 阅读(21) 评论(0) 推荐(0)
摘要: TempStr = eval(input("请输入带有符号的温度值: ")) if TempStr[-1] in ['F','f']: C = (eval(TempStr[0:-1]) - 32)/1.8 print("转换后的温度是{:.0f}C".format(C)) elif TempStr[ 阅读全文
posted @ 2025-03-16 19:10 渔樵伴夜归客 阅读(10) 评论(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[-1] in 阅读全文
posted @ 2025-03-16 19:08 渔樵伴夜归客 阅读(16) 评论(0) 推荐(0)
摘要: 大模型读书报告 一、引言 随着科技的迅猛发展,大模型成为当下最炙手可热的领域之一。它如同一场智能风暴,席卷了众多行业,引发广泛关注与深入探索。为深入了解这一前沿技术,通过研读专业书籍、学术论文开启求知之旅。 二、核心内容剖析 大模型的构建基础是海量数据与复杂神经网络架构。Transformer架构凭 阅读全文
posted @ 2025-03-09 19:23 渔樵伴夜归客 阅读(27) 评论(0) 推荐(0)