- 博客(10)
- 收藏
- 关注
原创 实验-画玫瑰
import turtleimport time设置初始位置turtle.penup()turtle.left(90)turtle.fd(200)turtle.pendown()turtle.right(90)花蕊turtle.fillcolor(“red”)turtle.begin_fill()turtle.circle(10, 180)turtle.circle(25, 110)turtle.left(50)turtle.circle(60, 45)turtle.circl
2021-01-04 20:06:11
104
原创 实验——反恐精英
import timeclass Bullet:def init(self):self.clip = Nonedef install_clip_clip(self,clip):if not self . clip:print(“装弹成功”)else:print(“枪已经有弹夹”)class Actor:def init(self,name):self .name = name #姓名self . HP = 100 #血量self . PP = 0 #护甲def install_c
2021-01-08 12:40:43
284
原创 大富翁
EVENT = [“1”,“2”,“3”,“4”,“5”]class checkBoard:def init(self,EVENT):self . event = EVENTclass player:def init(self,sex,name,money,room,status,distance):self.sex = sexself.name = nameself. money = moneyself.room = roomself.status = statusself.dist
2021-01-07 12:06:58
344
原创 登录
**登录**from faker import Fakerfake = Faker(locale=‘zh_CN’) # 伪造中文数据print(fake.ssn())class Person:def init(self, zhang_hao, sec_key):self.z_h = zhang_haoself.sk = sec_keyperson_list = []for i in range(0, 1000):zhanghao = fake.name()print(zhangha
2021-01-07 12:05:45
263
原创 实验-九九乘法表
外层for循环代表打印9行for i in range(1, 10):# 内层for循环打印列# 第一行1列,第而行2列,以此类推for j in range(1, i+1):# 格式化 输出{行}x{列}={行乘列}print(’{}x{}={}\t’.format(j, i, i*j), end=’’)print()...
2021-01-05 12:18:27
187
原创 实验-网络攻击(字典攻击)
字典攻击import itertools # 迭代器import datetimeimport hashlibimport timedef generatelibary(library, length=8):libararys = itertools.product(library, repeat=length)dic = open(“paswordlirbarys.txt”, “w”, encoding=‘utf-8’) # 写模式打开文件for i in libararys:dic
2021-01-04 20:15:27
718
原创 实验-实例化对象
#万事万物皆对象#参与对象#85个student#共有属性:姓名,性别,学号,年龄#你的属性:小明,男,2020100220,18class student : #class为类的修饰符, student为类名def abs(selfself,name,sex,number,age):student. name = namestudent. sex = sexstudent. no = numberstudent. age = agezhangmin = student...
2021-01-04 19:56:51
172
原创 实验-找对象
##实验名称找对象class friend:def init(self,name,sex,facevalue,skill):self.name = nameself.sex = sexself.facevalue = facevalueself.skill = skilldef goodmorning(self):if self. sex == “女”:print (“早上好”)else:print (“你是大帅哥”)boyFriend = friend (“宋祖儿”,“女”,“ve
2021-01-04 19:54:53
196
原创 实验报告-小黑屋
import randomimport timeEVENT = [“衣衫褴褛的人”,“沼泽”,“xxx”]#事件列表SOURCE = [“木材”,“肉”,“布”]#资源列表SKILL = [,“降龙十八掌”,“九阴白骨爪”,“九阴真经”,]def Init():#初始人物person = {“HP”:100, “Hungry”:100, “IQ”:100,“skill”:"",“木材”:1, “fire”:0}#人的初始状态time.sleep(2)#停止运行2秒print(“人物生成中
2021-01-04 19:52:04
137
原创 智能人工API
学习内容:1、 搭建 python开发环境2、 掌握 python基本语法3、 掌握条件语句4、 掌握循环语句问题描述操作过程中遇到的问题:1无法正常运行2.无法正常对话原因1.循环语句语法错误。2.格式不对,行列没有对齐3.没联网...
2021-01-04 19:09:07
121
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅