摘要: import pygame import sys import random # 素材参考地址:https://www.aigei.com/s?q=flappy+bird&type=2d class Bird(object): """定义一个鸟类""" def __init__(self): """ 阅读全文
posted @ 2023-12-28 23:38 夕照~~ 阅读(57) 评论(0) 推荐(0)
摘要: ```import jieba # 读取文本文件path = "红楼梦.txt"file = open(path, "r", encoding="utf-8")text = file.read()file.close() # 使用jieba分词words = jieba.lcut(text) # 统 阅读全文
posted @ 2023-12-28 23:07 夕照~~ 阅读(38) 评论(0) 推荐(0)
摘要: #爬虫爬取Google20次 import requests url = 'https://www.google.com'for i in range(20): response = requests.get(url) print(f"第{i+1}次访问") print(f'Response sta 阅读全文
posted @ 2023-12-28 17:42 夕照~~ 阅读(33) 评论(0) 推荐(0)