- 博客(12)
- 收藏
- 关注
原创 使用python的一行代码来绘制❤️型图
# coding=utf-8print('\n'.join([''.join([('.YaoYuan-'[(x-y)%8] if((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3<=0 else' ') for x in rang...
2019-01-31 10:01:12 1654 1
原创 使用python的MyQR库来制作有趣的带有图片背景的二维码
# coding=utf-8from MyQR import myqrimport osversion, level, qr_name = myqr.run( words='https://app.yinxiang.com/shard/s16/nl/2875597/b83a167b-af75-4ff7-a81f-eae460a5de16/', version=1, ...
2019-01-30 14:50:27 1552 6
原创 使用itchat库导出微信联系人头像,并保存至指定位置
# -*- coding: utf-8 -*-import itchat# 用于二维码登录微信,itchat.auto_login()# 获取通讯录for friend in itchat.get_friends(update=True)[0:]: # print(friend['NickName'])# print(friend['NickName']) i...
2019-01-30 14:43:44 1096 1
原创 python的itchat库练习---print出群聊的发言信息,包含用户昵称和发言内容
import itchatfrom itchat.content import *from itchat.content import [email protected]_register(TEXT,isGroupChat=True)def text_reply(msg): print(msg['isAt']) print(msg['ActualNickName']) ...
2019-01-30 14:29:19 773
原创 python的itchat库学习----微信私聊自动回复及群聊自动回复,仅限文字
import itchatfrom itchat.content import *from itchat.content import [email protected]_register(TEXT,isGroupChat=True)def text_reply(msg): print(msg['isAt']) print(msg['ActualNickName']) ...
2019-01-30 14:26:03 660
原创 如何用python的turtle海龟制图画一个不正经的爱心❤️
# coding=utf-8import turtleimport timedef draw_circle(): for i in range(400): turtle.right(0.5) turtle.forward(1)def draw_love():# turtle.color('red','darkred')# turt...
2019-01-30 14:20:40 19986 1
原创 Pygame 简单实例(5)窗口在固定尺寸和全屏之间切换
# coding=utf-8import pygamefrom pygame.locals import *from sys import exit# 初始化pygame.init()pygame.display.set_caption("按下F1可进行全屏和固定尺寸的切换")background_image='front.png'screen=pygame.display....
2019-01-30 14:05:30 4968 1
原创 Pygame 简单实例(4)pygame.font
# coding:utf-8import pygamefrom pygame.locals import *from sys import exitbackground_image_file="bkkk.jpg"pygame.init()screen=pygame.display.set_mode((500,500),0,32)#my_name="若你碰到他若你碰到她"fo...
2019-01-30 14:02:13 957
原创 Pygame 简单实例(3)键盘事件
# coding=utf-8import pygamefrom pygame.locals import *from sys import exitbackground_image_file='front.png'pygame.init()pygame.display.set_caption("Sugar")screen=pygame.display.set_mod...
2019-01-30 13:49:34 8898 1
原创 Pygame 简单实例(2)事件event的管理
# coding=utf-8import pygamefrom pygame.locals import *from sys import exitfrom random import randintscreen_size=(640,480)pygame.init()screen=pygame.display.set_mode(screen_size,0,32)font=pyg...
2019-01-30 13:43:38 470
原创 Pygame 简单实例(1)图像的显示
# coding=utf-8import pygameimport timefrom random import randintfrom pygame.locals import *from sys import exitbackground_image_name='bk.jpg'#定义背景图片mouse_image_name='front.png' #定义光标图片#初始化p...
2019-01-30 11:38:56 2774
原创 使用random模块,打印随机数
#!/user/bin/python#coding:utf-8import randomprint(random.randint(1,10)) #输出1-10之间的随机整数print(random.random()) #输出0-1之间的随机数PyDev console: starting.Python 3.7.0 (v3.7.0:1bf9cc5093, Jun...
2018-10-23 14:45:26 801
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人