摘要: import pygame.freetype import sys import random pygame.init() screen = pygame.display.set_mode((600, 400)) pygame.display.set_caption('game') p = 0 i1 阅读全文
posted @ 2023-12-17 22:02 张舒情 阅读(28) 评论(0) 推荐(0)
摘要: 什么是NumPy? NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。 NumPy 的前身 Numeric 最早是由 Jim Hugunin 与其它协作者共同开发,2005 年,Travis 阅读全文
posted @ 2023-12-17 21:51 张舒情 阅读(7) 评论(0) 推荐(0)
摘要: def printIntro(): print("这个程序模拟两个选手A和B的乒乓球比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)") print("学号后两位数字:32") def printInputs(): a = eval(input("请输入选手A的能力值(0 阅读全文
posted @ 2023-12-17 21:49 张舒情 阅读(23) 评论(0) 推荐(0)
摘要: import jiebaexcludes={"一个","那里","怎么","我们","不知","两个","甚么","不是","只见","原来","如何","这个","不曾","不敢","闻言","正是","只是","那怪","出来 阅读全文
posted @ 2023-12-17 21:42 张舒情 阅读(27) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-12-17 21:39 张舒情 阅读(8) 评论(0) 推荐(0)
摘要: import requestsurl="https://www.baidu.com/"def gethtml(url): try: r=requests.get(url) r.raise_for_status() r.encoding="utf-8" print("text内容:",r.text) 阅读全文
posted @ 2023-12-13 09:53 张舒情 阅读(10) 评论(0) 推荐(0)