自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (1)
  • 收藏
  • 关注

原创 多种弹框(进阶)

# tk common message boxes## this module provides an interface to the native message boxes# available in Tk 4.2 and newer.# options (all have default values):## - default: which button to make default (one of the reply codes)## - icon: which icon to

2021-08-16 12:15:54 95

原创 2021-07-04潜水艇

a=input().split(" ")b=int(a[0])c=int(a[1])d=input()e=len(d)for i in range(e): if d[i]=="u": if c-1>=0: c=c-1 elif d[i]=="d": if c+1<=b: c=c+1 print(c)

2021-07-04 11:29:12 82

原创 如何使用pygame制作游戏

便宜game下载途径不用多说,别的地方有,下面上代码。import sys,pygame,randomfrom pygame.locals import*pygame.init()def printtext(font,x,y,text,color=(155,155,155)): Text=font.render(text,True,color) screen.blit(Text,(x,y))font2=pygame.font.SysFont('fangsong',24)pig

2021-07-01 17:27:23 665 3

原创 心得水一波()

阿巴巴巴

2021-07-01 17:22:19 61

转载 python创建二维数组方法

#Python# 二维数组的定义、使用的几种方法通常的困扰1、先介绍最简单的一种方式2、再介绍最常见的一种方式3、最后介绍最暴力直观的一种方式通常的困扰之前对Python里面创建、使用二维数组也很懵,于是也上网查了一些讲解,也发现一些类似的问题,大多数存在着 以为定义正确了二维数组,但修改数据的时候,发现数据经常一起串改。如: b=[[0,0,0]]*3 b[0][1]=1 #这里因为初始[0,0,0]可以这样写数据,如果初始空数组则不能 print(b) ...

2021-07-01 17:18:41 27160

原创 循环嵌套Python篇

如果有一只猫,每一站要吃一只鱼,车厢上有冰箱,可以储藏鱼,但是要付钱,问最少要多少钱?:上代码:其中a[],b[]是购买价格与储藏钱数,用了循环嵌套来完成。a=[]b=[]A=int(input())for i in range(A): c=input().split(" ") d=int(c[0]) e=int(c[1]) a.append(d) b.append(e)f=len(a)gs=0m=0mm=0mmm=0for i in

2021-05-26 17:46:06 59

原创 如何用python卡爆电脑

用tkinter加死循环不断制造窗口:​import tkintera=0while a=0: wow=tkinter.Tk()​

2021-05-25 20:42:17 753

原创 2021-05-25沙雕程序

一段沙雕程序。import timeimport randomimport tkinterimport tkinter.messageboximport os,os.pathprint ("loading",end="")for i in range(0,1,1): time.sleep(1) print(".",end="")print("666")a=1coin=0mode=0win=tkinter.Tk()win.title("Ad's World!

2021-05-25 20:28:38 87

原创 python turtle五星红旗

今天是疯狂写博的一天,望三连!!!import turtleimport randomturtle.setup(width=0.6,height=0.6)qw=(0.314,0.1428,0.11235)turtle.pencolor('red')we=(0.19,0.68,0)turtle.fillcolor('red')turtle.speed(10)turtle.begin_fill()for i in range(2): a=random.randint(1,360)

2021-05-25 20:26:02 1040

原创 数据综合处理——幸运号码抽奖

a=input()if a[3]=='-': b=a[0:3] c=int(a[4:12])else: b=a[0:4] c=int(a[5:13])print(b,c)if b=='010': d=0else: d=1cc=str(c)e=1for i in range(8): if cc[i]=='8': e=0if c%2==0: f=0else: f=1if c%3==0: g=0.

2021-05-25 20:19:29 172

原创 又是一段笔记

print() 打印数据默认换行,不换行要加上 end=""#注释'''注释1注释2'''int 整数bool 布尔float 浮点数

2021-05-25 20:16:41 48

原创 自学的笔记

可变数据:list 列表 dictionary 字典 set 集合不可变数据:number数学 string字符串 tuple 元组abs(x) -10_10ceil(x)4.1_5fabs(x)-10_10.0floor(x)4.9_4max(x,y)最大min(x,y)最小modf(x)1.1_1.0 0.1pow(x,y)x的y次方(x**y)round(x[,n])四舍五入到n位sqrt(x)x平方根...

2021-05-25 20:13:36 61

原创 一段有点bug的游戏

废话少说,亮代码。`monster=(‘小火龙’,‘火恐龙’,‘喷火龙’)monster1={‘名字’:‘小火龙’,‘属性’:‘火’,‘生命’:‘C’,‘攻击’:‘C’,‘防御’:‘C’,‘速度’:‘D’,‘技能1’:‘小火球’,‘技能2’:‘撕咬’,‘技能3’:‘龙盾’}dishu={‘名字’:‘地鼠’,‘属性’:‘土’,‘等级’:2,‘生命’:99999,‘攻击’:100000,‘防御’:989,‘速度’:100,‘技能1’:‘碎石’,‘技能2’:‘撞击’,‘技能3’:‘硬化’}qwe=0po

2021-05-25 20:11:46 113 1

原创 pyhon 之 登陆篇——os存档

import randomimport os,os.pathtry : os.remove("s")except OSError: print("检测到您为新用户,已为您新建。")print("注册:")nm=input("请输入账号名:")pin=input("请输入密码:")file_object=open("saving.txt","w")file_object.write(nm+pin)file_object.close()file_object=open("s.

2021-05-25 20:07:51 183 1

原创 turtle程序

一段turtle程序import randomA=0B=0C=0D=0E=0F=0gs=random.randint(4,6)aa=[]if gs==4: for i in range(0,15): D+=1 if D==2: D=0 C=C+1 if C==2: C=0 B=B+1 if B==2: ...

2021-05-24 21:15:20 256

python菜鸡的作品

一段py程序

2021-05-25

空空如也

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

TA关注的人

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