摘要: 点击查看代码 import pygame import sys import random class Bird(object): """定义一个鸟类""" def __init__(self): """定义初始化方法""" self.birdRect = pygame.Rect(60, 50, 5 阅读全文
posted @ 2023-12-21 22:20 暮木叁水 阅读(64) 评论(0) 推荐(0)
摘要: 采用排球比赛规则 点击查看代码 from random import random def printInfo(): # 打印程序介绍信息 print('这个程序模拟两个选手A和B的某种竞技比赛') print('程序运行需要A和B的能力值(以0到1之间的小数表示)') print('蒋彬 25') 阅读全文
posted @ 2023-12-18 20:03 暮木叁水 阅读(116) 评论(0) 推荐(0)
摘要: 点击查看代码 import jieba import wordcloud def takeSecond(elem): return elem[1] def createWordCloud(text): #生成词云函数 w=wordcloud.WordCloud(font_path="STZHONGS 阅读全文
posted @ 2023-12-18 19:42 暮木叁水 阅读(42) 评论(0) 推荐(0)
摘要: ![image](https://img2023.cnblogs.com/blog/3313360/202312/3313360-20231218193344030-698551846.png) 阅读全文
posted @ 2023-12-18 19:34 暮木叁水 阅读(27) 评论(0) 推荐(0)
摘要: 一,基本函数的用法 NumPy(Numerical Python): NumPy 是 Python 中用于科学计算的基础包。它提供了多维数组对象(例如 ndarray)、用于数组操作的各种函数以及线性代数、傅里叶变换和随机数生成等功能。NumPy 的主要优势在于其高效的数组处理能力,使得数据处理变得 阅读全文
posted @ 2023-12-17 18:55 暮木叁水 阅读(88) 评论(0) 推荐(0)
摘要: 1 import requests url = 'https://www.google.com' for i in range(20): response = requests.get(url) print(f"第{i+1}次访问") print(f'Response status: {respon 阅读全文
posted @ 2023-12-10 22:07 暮木叁水 阅读(19) 评论(0) 推荐(0)