自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 python client和server实验

import socketClient = socket.socket()#建立clientClient.connect((“127.0.0.1”,9099))while True:msg = input(“请输入你想给客户发送的消息:”)if msg == “exit”:breakClient.sendall(msg.encode(“utf-8”))data = Client.recv(1024)#0100011110011print(data.decode(encoding=“utf-

2021-01-07 21:29:19 367

原创 python石头剪刀布小实验

strl = input(“请出剪刀。石头,或布:”)if strl == “剪刀”:print(“我出石头”)elif strl == “石头”:print(“我出布”)elif strl == “布”:print(“我出剪刀”)else:print(“执行这个”)print(“执行到这里”)...

2021-01-07 21:22:18 239

原创 python增删改查实验2021-1-7

#增删改查dict1={“name”:“张三”,“sex”:“男”,“age”:56,“clothes”:“冬装”}dict1[“clothes”]=“夏装”print(dict1)dict1[“glasses”]=Trueprint(dict1)dict1[“Monday”]=“over 1 billion”print(dict1)dict1[“NickName”]=“砖石王老五”print(dict1)del dict1[“NickName”]#删除print(dict1)dic

2021-01-07 19:02:58 110

原创 python数字猜谜实验2021-1-16

#数字猜谜def jingling(ball,level,hp):if ball==“大师球”:rollcoin=100return"捕捉到小精灵"elif ball==“高级球”:rollcoin=random.randint(70,100)elif ball==“普通球”:rollcoin = random.randint(40,90)if level>80:rollcoin=rollcoin-5if hp > 80:rollcoin=rollcoin-20if r

2021-01-06 21:42:27 122

原创 python小黑屋实验

import randomimport timeEVENT = [“衣衫褴褛的人”,“马保国”,“xxx”]SOURCE = [“木材”,“肉”,“布”]SKILL = [“降龙十八掌”,“打狗棍法”,“九阳真经”,“如来神掌”]def Init():person = {“HP”:100, “Huangry”:100, “IQ”:100,“skill”:"",“木材”:0, “fire”:0}time.sleep(1)print(“人物生成中>>>>>&gt

2021-01-06 13:54:40 153

原创 python字典攻击小实验

import itertoolsimport datetimeimport hashlibimport timedef generatelibary(library, length=6):libararys = itertools.product(library,repeat=length)dic = open(“paswordlirbarys.txt”,“w”,encoding=‘utf-8’)for i in libararys:dic.writelines(i)dic.writeli

2021-01-04 13:49:45 145

原创 2021-01-03

class parent:def init(self,name,sex):self.nsme = nameself.sex = sexdef study(self):print(“人生来就会学习”)class son(parent):def study(self,str1,str2):print(“这个小傻非常喜欢学习{},{}”.format(str1,str2))son1 = son(“小傻”,“人”)son1.hight = 150print(son1.hight)son1.s

2021-01-03 18:46:21 59

原创 python实验-简易版非诚勿扰

#coding:UTF-8#简陋版非诚勿扰#涉及到的待匹配数据#1.Sex(性别) 2.City(工作地区) 3.Age(年龄) (18-50) 4.Height(身高)(129-211) 5.Education(6选1)#6.marital_status 7.income(24000-600000)#8.name姓名 9.adim 对另一半要求import randomnametext=’’‘冰颖、成欢、惠镁、慧菲、加羽、初夏、雅香、语雪、初珍、白安、美铭、铭思、瑞翻、尚闻、细林、从雪、白

2021-01-02 20:24:12 193

原创 登录小实验

-- coding: utf-8 --“”"Created on Fri Feb 2 16:14:31 2018@author: Administrator一个简单的登录注册Demo“”"def showMessage():print(’—新建用户:(键入N/n)—’)print(’—登录帐号:(键入E/e)—’)print(’—退出程序:(键入Q/q)—’)def new_user():while True:myname = input(“请输入用户名:”)if myname

2021-01-02 14:55:57 153

原创 2021-01-01

#加密#维吉尼亚密码str1=(“世界上有,很多的东西,你生不带,来死不带去,你能带走的,只有”)str2=(“世界上有,很多的东西,你生不带来,死不带去你,能带走的只有,”)str3=(“触摸过一,个人孤独的,惧也看到过,最美的风景,我跌跌撞撞奔,”)str4=(“无论如何,一起经历了,风雨平平淡,淡安安静静,的老去我们拼,”)table1=str.maketrans(str1,str2)table2=str.maketrans(str2,str3)table3=str.maketrans

2021-01-01 15:23:52 73

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除