摘要: import java.awt.FlowLayout;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.Button 阅读全文
posted @ 2024-04-18 14:55 一只蜗牛hhhh 阅读(2) 评论(0) 推荐(0) 编辑
摘要: (2)请用requests库的get()函数访问如下一个网站20次,打印返回状态,text()内容,计算text()属性和content属性所返回网页内容的长度。(不同学号选做如下网页,必做及格)‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬‪‬‪‬ 阅读全文
posted @ 2023-12-28 23:40 一只蜗牛hhhh 阅读(4) 评论(0) 推荐(0) 编辑
摘要: np.array():创建numpy数组 np.zeros():返回全0数组 np.ones():返回全1数组 np.arange():创建等差数列数组 np.linspace():创建等间隔数列数组 np.reshape():改变数组形状 数组运算 np.add():加法运算 np.subtrac 阅读全文
posted @ 2023-12-28 23:31 一只蜗牛hhhh 阅读(4) 评论(0) 推荐(0) 编辑
摘要: print("05")from random import randomdef printInfo(): # 打印程序介绍信息 print('这个程序模拟两个选手A和B的某种竞技比赛') print('程序运行需要A和B的能力值(以0到1之间的小数表示)')def getInputs(): # 获得 阅读全文
posted @ 2023-12-28 23:11 一只蜗牛hhhh 阅读(3) 评论(0) 推荐(0) 编辑
摘要: import pygameimport sysimport randomfrom PIL import Image # 素材参考地址:https://www.aigei.com/s?q=flappy+bird&type=2dprint("学号后两位05") class Bird(object): " 阅读全文
posted @ 2023-12-28 23:02 一只蜗牛hhhh 阅读(13) 评论(0) 推荐(0) 编辑
摘要: import jiebawith open('红楼梦.txt','r',encoding='utf-8')as f: txt = f.read() words = jieba.lcut(txt) counts={} for word in words: if len(word) == 1: cont 阅读全文
posted @ 2023-12-28 21:55 一只蜗牛hhhh 阅读(89) 评论(0) 推荐(0) 编辑
摘要: import turtle, datetime def drawGap(): # 绘制数码管间隔turtle.penup()turtle.fd(5) def drawLine(draw): # 绘制单段数码管drawGap()turtle.pendown() if draw else turtle. 阅读全文
posted @ 2023-11-23 17:49 一只蜗牛hhhh 阅读(8) 评论(0) 推荐(0) 编辑
摘要: print("超市抹零:") a=float(input('扫描的第一个商品价格:'))b=float(input('扫描的第二个商品价格:'))c=float(input('扫描的第三个商品价格:'))d=a+b+cprint('总计:',int(d))print("3105") python = 阅读全文
posted @ 2023-11-01 00:30 一只蜗牛hhhh 阅读(5) 评论(0) 推荐(0) 编辑
摘要: import randomS =20e6N = 0for i in range(int(S)):x = random.random()y = random.random()d = (x-0.5)**2+(y-0.5)**2if d<=0.5**2: N+=1else:passPI = 4*N/Spr 阅读全文
posted @ 2023-10-31 23:44 一只蜗牛hhhh 阅读(9) 评论(0) 推荐(0) 编辑