摘要: import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams['axes.unicode_minus'] = False plt.rcParams['font.sans-serif'] = 'S 阅读全文
posted @ 2023-12-18 17:34 lin_1 阅读(29) 评论(0) 推荐(0)
摘要: 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-18 17:27 lin_1 阅读(36) 评论(0) 推荐(0)
摘要: import jiebawith open('红楼梦.txt','r',encoding='utf-8')as f: # 打开文件 txt = f.read() # 读取为txt words = jieba.lcut(txt) # 利用jieba库的lcut分词 counts={} # 创建字典 f 阅读全文
posted @ 2023-12-17 14:35 lin_1 阅读(33) 评论(0) 推荐(0)
摘要: (1)请用requests库的get()函数访问如下一个网站20次,打印返回状态,text()内容,计算text()属性和content属性所返回网页内容的长度。 ‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬ 阅读全文
posted @ 2023-12-11 20:58 lin_1 阅读(82) 评论(0) 推荐(0)
摘要: 一,必做题 1.打印程序的介绍性信息式(要求包括你们学号后两位信息) # 定义一个函数,打印基本的赛制信息 def print_information(): print("学号为2022310143136的同学为这一场比赛的裁判员") print("接下来请选择两队指派选手进行比赛,比赛采用五局三胜 阅读全文
posted @ 2023-11-19 23:40 lin_1 阅读(34) 评论(0) 推荐(0)
摘要: import turtle,datetime # 定义一个,用于绘制代码管的间隙 def draw_gap(): turtle.penup() turtle.forward(5) # 定义一个函数,用于绘制一段代码管,这里传入的参数输一个bool类型 def draw_line(draw): dra 阅读全文
posted @ 2023-11-19 23:37 lin_1 阅读(47) 评论(0) 推荐(0)
摘要: # 03运行超市抹零结账行为 # 运行超市抹零结账的行为 money_all=4758837.3847 money_all_str=str(money_all) print("商品的总额为"+money_all_str) print("实际的收取的金额为:"+str(int(money_all))) 阅读全文
posted @ 2023-10-31 22:54 lin_1 阅读(29) 评论(0) 推荐(0)
摘要: python求pi 阅读全文
posted @ 2023-10-31 09:14 lin_1 阅读(61) 评论(0) 推荐(0)