摘要: 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 # Author: ss 4 5 import pygame 6 import sys 7 import random 8 import math 9 10 11 class Ball(pygame.sprite.Sprite): 12 def __init__... 阅读全文
posted @ 2018-06-22 23:45 爬虫爬一个 阅读(698) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 #Author: ss 4 5 import pygame 6 import sys 7 8 # 初始化 9 pygame.init() 10 11 size = width,height = 1000,600 # 设置屏幕尺寸 12 BLUE = 0,0,255 13... 阅读全文
posted @ 2018-06-22 10:42 爬虫爬一个 阅读(4735) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python# -*- coding:utf-8 -*- #Author: ssimport easyguiimport syswhile 1: easygui.msgbox('开始第一个小游戏','开始游戏') msg = '请问你想看什么类型的电影?' title 阅读全文
posted @ 2018-06-08 10:29 爬虫爬一个 阅读(1239) 评论(0) 推荐(0) 编辑
摘要: #汉诺达游戏 def hanni(n,x,y,z): if n == 1: print(x,'-->',z) else: hanni(n-1,x,z,y)#n-1移动到y print(x,'-->',z) hanni(n-1,y,x,z)#n-1移动到z n = int(i... 阅读全文
posted @ 2018-06-06 15:56 爬虫爬一个 阅读(374) 评论(0) 推荐(0) 编辑
摘要: ##位置参数 def func1(x,y): print("{} + {} = {}".format(x,y,x+y)) ##默认参数 def func2(x,y=5): print("{} + {} = {}".format(x,y,x+y)) ##可变参数 def func3(*x): print(len(x),x[0]) ## def func4(n... 阅读全文
posted @ 2018-06-02 23:38 爬虫爬一个 阅读(607) 评论(0) 推荐(0) 编辑
摘要: def wai(x): def nei(y): return x * y return nei i = wai(3) print(i,type(i)) print(i(6)) 阅读全文
posted @ 2018-06-02 23:38 爬虫爬一个 阅读(132) 评论(0) 推荐(0) 编辑
摘要: show2 = list(filter(lambda x:x % 2,range(20))) print(show2) 阅读全文
posted @ 2018-06-02 23:34 爬虫爬一个 阅读(212) 评论(0) 推荐(0) 编辑
摘要: def func1(): print('func1()正在被调用') def func2(): print('func2()正在被调用') func2() return 5 print(func1()) 阅读全文
posted @ 2018-06-02 23:33 爬虫爬一个 阅读(186) 评论(0) 推荐(0) 编辑
摘要: t = list(map(lambda x:x**2,range(1,11))) print(t) 阅读全文
posted @ 2018-06-02 23:32 爬虫爬一个 阅读(358) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python# -*- coding:utf-8 -*- #Author: ssimport pickle #泡菜模块f = open('1.pkl','rb')answer = pickle.load(f)print(answer)f.close() #关闭文件,为了 阅读全文
posted @ 2018-05-31 13:41 爬虫爬一个 阅读(350) 评论(0) 推荐(0) 编辑

人生在与折腾、在于学习、在于进步