自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2020-12-01

# 创建小鸟方块存储小鸟位置信息bird_rect = bird_surface.get_rect(center=(100, 240))while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN:

2020-12-01 23:19:12 83

原创 2020-12-01

如何使用re.findall()调用findall()方法时,若字符串匹配,则返回字符串import rea = re.findall('blue', 'blue')print(a)结果为:D:\Python\python.exe ['blue']Process finished with exit code 0当findall()方法中字符串不匹配时,返回空组import rea = re.findall('blue', 'python')print(a)结果为:

2020-12-01 16:59:35 104

原创 2020-11-23

处理Python导入图片报错# 处理报错:iCCP: known incorrect sRGB profileimport os# 你的ImageMagick位置CMD = r'D:\ProgramSoftWare\ImageMagic\ImageMagick-7.0.10-Q16\magick.exe'# 需要处理的文件夹的位置SOURCE_PATH = r'E:\ProgramCodes\pythonProject\images'def doStrip(path): data

2020-11-23 15:28:36 84

原创 2020-11-23

Python学习历程元组# 元组的学习# 列表的值可修改# 元组的值不可变# 元组使用圆括号()标识# 使用索引访问元素dimensions = (200, 40)print(dimensions[0])# 使用for循环遍历tuple中的所有元素my_foods = ('apple', 'banana', 'ice cream', 'bugs')for food in my_foods: print(food)# 修改元组变量# 为元组重新赋值dimensi

2020-11-23 13:06:32 77

原创 应用实例

单片机应用实例学习@TOC应用实例----单片机INT0中断脉冲计数代码:#include <reg51.h>#include <intrins.h>#define uint unsigned int#define uLint unsigned long int //长整型uLint pulse_w = 0 ;//计算脉冲的时间,用长整型可以达到10的9次方us,如果用uint,最大只能达到65535us(还不到100ms)sbit in = P3^2 ;void

2020-11-22 16:39:17 290

空空如也

空空如也

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

TA关注的人

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