自定义博客皮肤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)
  • 收藏
  • 关注

原创 简单的人机聊天

简单的人机聊天import urllib.requestimport jsonimport stringwhile True:target = r’http://api.qingyunke.com/api.php?key=free&appid=0&msg=’Keyword = input(“想聊点儿什么:”)if Keyword == “exit”:print(“不聊算了,拜拜”)breaktmp = target + Keywordurl = urllib.parse

2021-01-08 13:07:38 208 1

原创 小黑屋

import randomimport timeEVENT = [“Bobby”,“沼泽”,“xxx”]#事件列表SOURCE = [" 火柴",“牛肉”,“衣服”]#资源列表SKILL = [“降龙十八掌”,“打狗棒法”,“九阴白骨爪”,“九阴真经”,“如来神掌”]#技能列表def Init():#初始人物person = {“HP”:100, “Hungry”:100, “IQ”:100,“skill”:"",“火柴”:1, “fire”:0}#人的初始状态time.sleep(2)#

2021-01-08 12:35:07 78

原创 99乘法表

-- coding: UTF-8 --Filename : test.pyauthor by : www.runoob.com九九乘法表for i in range(1, 10):for j in range(1, i+1):print(’{}x{}={}\t’.format(j, i, i*j), end=’’)print()

2021-01-08 12:34:12 134

原创 加密解密

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Security.Cryptography;using System.IO;namespace Company.Common.Utils{public class EasyEncript{/// /// 密匙/// public const string PwdKey = “AB1CD2EF”;

2021-01-07 19:46:24 87

原创 字典找字

‘’’#1.有如下變量(tu是個元祖), 請實現要求的功能tu = (‘alex’, [11, 22, {‘k1’: ‘v1’, ‘k2’: [‘age’,‘number’],‘k3’: (11, 22, 33)}, 44])#a.講述元祖的特性#a.元祖是只可查數據類型,為不可變量數據類型 簡稱可hash#b.請問tu變量中的第一個元素’alex’是否可被修改#‘alex’是字符串不可變量數據類型不可以修改#c.請問tu變量中的’k2’對應的值是什麽類型?是否可以被修改?如果可以,請在其中添加

2021-01-07 19:45:54 105

原创 假人配对

#个人根据老师的配对程序仿写了部分代码,并对原代码进行了一些简化。以帮助同学们扩展思路.from random import random,choice,randint#—从随机模块(random)引入三个函数(随机random函数,choice函数,randint函数)xxx=[] #-----建立空列表#----下面用for循环语句生成含字典成员的xxx列表for x in range(0,1000): #—执行1000次下面的代码name=["苗惠文","黄士豪","林彦海","丁文

2021-01-06 10:21:11 638 1

原创 豆瓣top250爬虫

from urllib.request import urlopen, Requestfrom bs4 import BeautifulSoupimport randomclass DBTop250_Spider():url = r"http://book.douban.com/top250?start="page_num = 0top_num = 1headers = [{‘User-Agent’: ‘Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:3

2021-01-05 12:30:37 71

原创 买东西

class Actor:def init(self,name):self.name=nameself.HP=100self.pp=0def install_clip(self,clip,bullet):passclass Gun:def init(self):self.clip=Noneclass Bullet:def init(self):self.damage=40class Clip:def init(self):self.bullet_list=[]self.capa

2021-01-04 20:31:50 119

原创 保险

class Actor:def init(self,name):self.name=nameself.HP=100self.pp=0def install_clip(self,clip,bullet):passclass Gun:def init(self):self.clip=Noneclass Bullet:def init(self):self.damage=40class Clip:def init(self):self.bullet_list=[]self.capa

2021-01-04 20:30:09 98

原创 插花

class Actor:def init(self,name):self.name=nameself.HP=100self.pp=0def install_clip(self,clip,bullet):passclass Gun:def init(self):self.clip=Noneclass Bullet:def init(self):self.damage=40class Clip:def init(self):self.bullet_list=[]self.capa

2021-01-04 20:29:13 163

空空如也

空空如也

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

TA关注的人

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