




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、初级编程,2018/3/17,并非所有的蛇都会爬行,第一章 开始,PYTHON学习,2,你将了解 什么是python 在计算机上安装并使用python,1.Python介绍,一种计算机语言 高级语言(Java,Vb,Ruby,Python,C等多达上百种),PYTHON学习,3,和人类一样,计算机使用多种语言进行交流。一个编程语言只是一种与计算机对话的特殊方式。人类和计算机都能理解的指令。,2.安装Python-1,获取安装程序(下载) /downloads/windows/ 注意根据操作系统选择下载64或32位版本(可执行文件) 在windows下执
2、行安装程序,PYTHON学习,4,2.安装Python-2,启动python shell(IDLE),PYTHON学习,5,这就是Python Shell,Python Shell就是在计算机上解释执行python语言的控制台。 相当于你的大脑负责解释你和别人所说的话,并按照要求进行动作。,3.和计算机交流吧,你告诉计算机的第一句话 print(Hello World) Hello World ,PYTHON学习,6,让计算机做几道数学题 3 * 52 156 3670 - 156 3514,Symbol Operation + Addition(加) - Subtraction(减) * M
3、ultiplication(乘) / Division(除),第二章 编程第一步(变量),PYTHON学习,7,你将了解 什么是变量? 它能干什么? 如何使用它,4.什么是变量,变量(variable) 编程中的变量描述了存储信息的地方。比如数字、文本、数字和文本等等。从另一方面看,变量就像一个标签。,PYTHON学习,8, fred = 100 #定义一个变量,并给变量赋值 print(fred) #告诉计算机把变量表示的内容显示出来 100, fred = 200 #定义一个变量,并给变量赋值 john = fred #定义另一个变量,并把fred的值赋值给它 print(john) 20
4、0, found_coins = 20 magic_coins = 10 stolen_coins = 3 found_coins + magic_coins * 2 - stolen_coins * 3 31,第三章 编程第二步(常用数据),PYTHON学习,9,你将了解 STRINGS - 字符串 LISTS - 列表 TUPLES - 元组 MAPS - 地图,1.字符串String,String(字符串) 在编程术语中,我们通常称文本为字符串。你可以把一个字符串看作字母的集合,本资料里所有的字母、数字和符号都是一串字符。,PYTHON学习,10, fred = What is pink
5、 and fluffy? Pink fluff! print(fred) What is pink and fluffy? Pink fluff!,创造一个字符串,把它放在变量里,让计算机显示出来,说明 字符串用” 或者 来定义 字符串转义符号 , 试着顶一个 IAM COMPUTER,1.字符串String,在字符串种嵌入值,PYTHON学习,11, myscore = 1000 message = I scored %s points print(message % myscore) I scored 1000 points, nums = What did the number %s s
6、ay to the number %s? Nice belt! print(nums % (0, 8) What did the number 0 say to the number 8? Nice belt!,字符串乘法, print(10 * a) Aaaaaaaaaa,试试下面的输出结果,spaces = * 25 print(%s 12 Butts Wynd % spaces),2.比字符串更强大的列表(list),LIST(列表) 很多变量的集合,用进行定义,PYTHON学习,12, some_numbers = 1, 2, 5, 10, 20 some_strings = Whic
7、h, Witch, Is, Which,定义一个list,你可以对list进行如下操作, some_ some_strings.append(bear burp) #追加项目 del some_strings2 #删除第3项 print(some_strings2:3) #显示第3-4项 print(some_strings) #显示所有项 print(some_numbers + some_strings) #可以做加法 print(some_numbers * 5) #可以做乘法,除法,减法不行哦!,考虑一下为什么,2.另一种列表元祖(tuples),TUPLE(元祖) 元组类似于使用圆括
8、号的列表,用()进行定义,区别是创建后不能更改,PYTHON学习,13, fibs = (0, 1, 1, 2, 3) print(fibs3),定义一个tuple,你不可以改变tuple的内容否则计算机给给你报错, fibs0 = 4 Traceback (most recent call last): File , line 1, in fibs0 = 4 TypeError: tuple object does not support item assignment,2.帮你找到你想要的(字典),MAP(字典) 字典中的每一项都有一个键和一个对应的值。你可以根据键找到值。,PYTHON学
9、习,14, favorite_sports = Ralph Williams : Football,Michael Tippett :Basketball, Edward Elgar : Baseball,Rebecca Clarke : Netball,Ethel Smyth : Badminton, Frank Bridge : Rugby,定义一个map,你可以对字典做如下操作, print(favorite_sportsRebecca Clarke) #找到RebeccaClarke喜欢的运动 del favorite_sportsEthel Smyth #从字典中删除EthelSmy
10、th数据 favorite_sportsEthel Smyth = Ice Hockey #修改Ethel Smyth喜欢的运动 favorite_sportsCan Can=tennis #追加cancan喜欢的项目,第四章 海龟画图,PYTHON学习,15,你可以画出绚丽的图案,1.什么是海龟,PYTHON学习,16,Turbles是一个画板模块,你可以利用它绘图。,正如你写字并不需要你去制造铅笔和纸张,你可以利用turtle去绘画,2.海龟绘图,PYTHON学习,17,import turtle #引进海龟,你可以开始使用它 turtle.pencolor(red) #设置画笔颜色(红色
11、) turtle.pensize(1) #设置画笔粗细 turtle.forward(100) #让海龟前进50个像素 turtle.left(90) #左转90度 turtle.forward(100) #让海龟继续前进50个像素 turtle.left(90) #左转90度 turtle.forward(100) #让海龟继续前进50个像素 turtle.left(90) #左转90度 turtle.forward(100) #让海龟继续前进50个像素 turtle.up() #让海龟抬起笔 turtle.left(90) #左转90度 turtle.forward(50) #让海龟继续前
12、进25个像素 turtle.down() #让海龟放下笔 turtle.pencolor(green) #设置画笔颜色(绿色) turtle.pensize(3) #设置画笔粗细 turtle.circle(50) #画一个半径50的圆,3.运用技巧,PYTHON学习,18,import turtle #引进海龟,你可以开始使用它 myColor=red,green,brown index =0 for x in range(250): turtle.pencolor(myColorindex) index +=1 if index = 3: index = 0 turtle.forward(
13、x*2) turtle.left(92),右边的图怎么画出来的? 看看下面的代码让计算机干了什么,第五章 逻辑判断,PYTHON学习,19,用IF ELSE判断逻辑,1. 逻辑判断,PYTHON学习,20,age = 10 if age = 20: print(oh!you are yong) Elif age 20 and age 50 print(oh!you are old) else: print(oh!you are too old),2. 逻辑判断结构,PYTHON学习,21,条件符号,逻辑块,3. 多条件的逻辑判断,PYTHON学习,22,if age = 10 and age
14、= 13:,多个条件同时满足,任何一个条件满足即可,if age = 10 or age = 11 or age = 12 or age = 13:,复合型条件,if sex =“femal” and (age = 10 or age = 11 or age = 12 or age = 13):,4. 类型转换,PYTHON学习,23, myval = None if myval = None: print(The variable myval doesnt have a value),什么都没有保存的空值, age=10 if age = 10: print(The variable myv
15、al doesnt have a value),数值是字符串还是数字?, age=10 if age = 10: print(The variable myval doesnt have a value), age = 10 converted_age = int(age) age = 10 converted_age = str(age) age = 10.5 converted_age = int(age), if age = 10: print(The variable myval doesnt have a value),结果如何,第六章 重复事件处理,PYTHON学习,24,1. 循
16、环,PYTHON学习,25,作业要抄写100遍? NO!,print(“homework”) print(“homework”) print(“homework”) print(“homework”) print(“homework”) print(“homework”) print(“homework”) print(“homework”) print(“homework”) . print(“homework”) print(“homework”) print(“homework”) print(“homework”),so easy!,for x in range(0, 99): pri
17、nt(homework),for x in range(0, 99): print(hello %s % x),试试这个,2. 列表(list)的循环,PYTHON学习,26, print(list(range(10, 20) 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,简单的列表打印,class_list = class1,class2,class3,class4,class5 for x in range(0, 4): print(hello %s % class_listx),循环方式的列表打印,循环方式的遍历列表, wizard_list = spid
18、er legs, toe of frog, snail tongue, bat wing, slug butter, bear burp for i in wizard_list: print(i),左边的1和2实现方式有什么区别?,hugehairypants = huge, hairy, pants for i in hugehairypants: print(i) for j in hugehairypants: print(j),推测一下下面的结果,3. 一道循环的计算题,PYTHON学习,27,问题 宝箱里有20枚金币,每天会增加10枚,但是乌鸦每周会偷走3枚,请计算一年53周每周宝
19、箱内会剩余多少金币, found_coins = 20 magic_coins = 70 stolen_coins = 3 u coins = found_coins v for week in range(1, 53): w coins = coins + magic_coins - stolen_coins x print(Week %s = %s % (week, coins),4. 循环处理的几种语法,PYTHON学习,28,for step in range(0, 20): print(step),FOR循环,x = 45 y = 80 while x 50 and y 100: x
20、 = x + 1 y = y + 1 print(x, y),WHILE循环,for x in range(0, 20): print(hello %s % x) if x 9: break,Break可以提前退出循环,第七章 模块和函数,PYTHON学习,29,函数是一些处理逻辑的集合,模块是函数,变量的集合拥有更强大的功能,海龟就是一个绘图模块,1. 函数构成,PYTHON学习,30,def testfunc(myname): print(hello %s % myname),函数名,参数,处理,testfunc(Mary) print(savings(10, 10, 5),执行函数,de
21、f testfunc(fname, lname): print(Hello %s %s % (fname, lname),函数可以有多个参数,函数可以有返回值,def savings(pocket_money, paper_route, spending): return pocket_money + paper_route spending,2. 一个函数的例子,PYTHON学习,31,每周生产X个罐子,计算出一年中每周位置总共生产的罐子。,def spaceship_building(cans): total_cans = 0 for week in range(1, 53): total
22、_cans = total_cans + cans print(Week %s = %s cans % (week, total_cans),函数调用,spaceship_building(2) #A工厂每周只能生产2个 spaceship_building(10) #B工厂每周只能生产10个,考虑一下使用函数的好处,PYTHON学习,32,3. 模块(moudle),如何导入模块,import sys #导入系统模块 Import turtle #导入海龟绘图模块,只有导入模块后,才可以使用它,PYTHON学习,33,4. 使用sys模块,sys模块内部有一个特殊的对象称为stdin(标准输
23、入),它提供了一个相当有用的函数readline。ReadLine函数用于读取一行文本类型在键盘上,直到按回车键。,Standard input的略称,import sys def ageEV(): print(How old are you?) age = int(sys.stdin.readline() if age 15 and age40: print(you are a young!) else: print(you are old!) ageEV(),第八章 使用类和对象,PYTHON学习,34,一切皆对象,对象的定义被称作类,PYTHON学习,35,1. 类的实际概念,PYTHO
24、N学习,36,2. 类的实际概念-2,主类,class Things: pass,Things为类名,pass表示类里面为空,如果东西为父类的一部分,那么可以定义为子类,Class Inanimate(Things): pass,Inanimate为类名,括号中的Things表示父类,class Animate(Things): pass,同样我们可以定义东西的另一个子类生物,可以接着往下定义其他子类,class Sidewalks(Inanimate): pass,定义无生命东西的子类人行道,以此类推,class Animals(Animate): pass class Mammals(An
25、imals): pass class Giraffes(Mammals): pass,PYTHON学习,37,3. 类的使用,class Giraffes(Mammals): pass,你有一只长颈鹿,我们给它名字叫reginald(对象),reginald = Giraffes(),定义了长颈鹿类,对象的使用,你的类定义空空如野,尝试加些特征(函数)吧,class Animals(Animate): def breathe(self): #呼吸 pass def move(self): #移动 pass def eat_food(self): #食物 pass,class Mammals(A
26、nimals): def feed_young_with_milk(self): pass,class Giraffes(Mammals): def eat_leaves_from_trees(self): pass,PYTHON学习,38,4. 为什么要使用类和对象,reginald = Giraffes() #名字为reginald的长颈鹿对象 reginald.move() #让长颈鹿reginald移动 reginald.eat_leaves_from_trees() #让长颈鹿reginald吃树叶,你有一只长颈鹿,我们给它名字叫reginald,harold = Giraffes(
27、) #名字为harold的长颈鹿对象 reginald.move() #让长颈鹿harold移动,思考,reginald.move() 为什么长颈鹿可以调用move()函数进行移动,子类继承父类的函数以及属性,PYTHON学习,39,5. 类和对象的例子,class Animals(Animate): def breathe(self): print(breathing) def move(self): print(moving) def eat_food(self): print(eating food) class Mammals(Animals): def feed_young_with
28、_milk(self): print(feeding young) class Giraffes(Mammals): def eat_leaves_from_trees(self): print(eating leaves),reginald = Giraffes() harold = Giraffes() reginald.move() harold.eat_leaves_from_trees(),丰富你的类,使用你的类和对象,类的函数都有一个参数叫self,它是干什么的?,PYTHON学习,40,6. Self的作用,class Giraffes(Mammals): def find_fo
29、od(self): self.move() print(Ive found food!) self.eat_food() def eat_leaves_from_trees(self): self.eat_food() def dance_a_jig(self): self.move() self.move() self.move() self.move(),Self代表类自己的对象 调用函数时这个参数不是必须的 一个函数可以调用另外一个函数,PYTHON学习,41,6. 类的特殊函数_self_(),_self_()是一个特殊函数,它在定义对象时被调用,用于通过传递参数初期化一些对象的属性,
30、class Giraffes: def _init_(self, spots): self.giraffe_spots = spots, ozwald = Giraffes(100) gertrude = Giraffes(150) print(ozwald.giraffe_spots) 100 print(gertrude.giraffe_spots) 150,初期化函数的例子,初期化函数的使用实例,第九章 python自带的常用函数,PYTHON学习,42,PYTHON学习,43,1. Python自带函数-1,获得绝对值 abs(), print(abs(10) 10,布尔变量 bool
31、(), print(bool(0) False print(bool(1) True print(bool(a),Dir函数, print(bool(0) False print(bool(1) True print(bool(a),#用它来计算绝对值,#用它来取得逻辑真假,可进行IF判断 还记得条件语法吗 if elif else,#它的参数是任意类型,执行结果可以告诉你,可以处理这种类型所有的函数。你需要从一堆结果中找出自己有用 的信息。看看下面的记过,对于整数你可以利用那些函数。, print(dir(1) _abs_, _add_, _and_, _bool_, _ceil_, _cl
32、ass_, _delattr_, _dir_, _divmod_, _doc_, _eq_, _float_, _floor_, _floordiv_, _format_, _ge_, _getattribute_, _getnewargs_, _gt_, _hash_, _index_, _init_, _init_subclass_, _int_, _invert_, _le_, _lshift_, _lt_, _mod_, _mul_, _ne_, _neg_, _new_, _or_, _pos_, _pow_, _radd_, _rand_, _rdivmod_, _reduce_,
33、 _reduce_ex_, _repr_, _rfloordiv_, _rlshift_, _rmod_, _rmul_, _ror_, _round_, _rpow_, _rrshift_, _rshift_, _rsub_, _rtruediv_, _rxor_, _setattr_, _sizeof_, _str_, _sub_, _subclasshook_, _truediv_, _trunc_, _xor_, bit_length, conjugate, denominator, from_bytes, imag, numerator, real, to_bytes,PYTHON学
34、习,44,2. Python自带函数-2,获得帮助help, help(abs) Help on built-in function abs in module builtins: abs(x, /) Return the absolute value of the argument.,执行命令函数 eval, your_calculation = input(Enter a calculation: ) Enter a calculation: 12*52 eval(your_calculation) 624,#用它让Python告诉你函数的使用方法,不过都是英文哦!,执行命令函数 eval
35、, my_small_program = print(ham) print(sandwich) exec(my_small_program) ham sandwich,区别 eval 可以有返回值 exec 无返回值,PYTHON学习,45,3. Python自带函数-3,浮点值 float(), print(abs(10) 10,整数 int(), float(123.456789) 123.456789 your_age = input(Enter your age: ) Enter your age: 20 age = float(your_age) if age 13: print(Y
36、ou are %s years too old % (age - 13) You are 7.0 years too old,#带很多位小数的值, int(123.456) 123 int(123) 123 int(123.456) Traceback (most recent call last): File , line 1, in int(123.456) ValueError: invalid literal for int() with base 10: 123.456,出错了! 字符串123.456不可以,PYTHON学习,46,4. Python自带函数-4,取得长度 len,
37、len(this is a test string) 21 creature_list = unicorn, cyclops, fairy, elf, dragon, troll print(len(creature_list) 6,取得最大数,最小值 max min, numbers = 5, 4, 10, 30, 22 print(max(numbers) 30 strings = s,t,r,i,n,g,S,T,R,I,N,G print(max(strings) t,范围函数 range, for x in range(0, 5): print(x) count_by_twos = l
38、ist(range(0, 30, 2) print(count_by_twos) 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 count_down_by_twos = list(range(40, 10, -2) print(count_down_by_twos) 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12,PYTHON学习,47,5. Python自带函数-5,计算和,文件访问, test_file = open(c:test.txt) text = te
39、st_file.read() print(text) 文件内容xxxxxxxxx, my_list_of_numbers = list(range(0, 500, 50) print(my_list_of_numbers) 0, 50, 100, 150, 200, 250, 300, 350, 400, 450 print(sum(my_list_of_numbers) 2250, test_file = open(c:myfile.txt, w) test_file.write(What is green and loud? A froghorn!) test_file.close(),读
40、取文件,写入文件,第十章 python常用的模块,PYTHON学习,48,Python模块是函数、类和变量的集合。为了使它们更容易使用。 Python使用模块来分组函数和类。例如,海龟模块,我们在前几章使用它,用它创建的画布在屏幕上画画。,PYTHON学习,49,1. 复制模块 copy -1,导入复制模块,复制模块的使用实例, class Animal: def _init_(self, species, number_of_legs, color): self.species = species self.number_of_legs = number_of_legs self.color
41、 = color,import copy, import copy #导入复制模块 harry = Animal(hippogriff, 6, pink) #创建harry对象 harriet = copy.copy(harry) #把harry复制到harriet print(harry.species) #输出harry的species属性 hippogriff print(harriet.species) #输出hariet的species属性 hippogriff,作用 把一个对象复制给另一个对象 就像你在复印机上复印资料一样,写入文件,创建一个动物类,PYTHON学习,50,2. 复
42、制模块 copy-2,Copy 和 deepcopy, harry = Animal(hippogriff, 6, pink) carrie = Animal(chimera, 4, green polka dots) billy = Animal(bogill, 0, paisley) my_animals = harry, carrie, billy more_animals = copy.copy(my_animals) print(more_animals0.species) hippogriff print(more_animals1.species) Chimera my_anim
43、als0.species = ghoul print(my_animals0.species) ghoul print(more_animals0.species) ghoul, more_animals = copy.deepcopy(my_animals) my_animals0.species = wyrm print(my_animals0.species) Wyrm print(more_animals0.species) ghoul,PYTHON学习,51,3. Python的关键字模块,关键字 keyword, import keyword print(keyword.iskey
44、word(if) True print(keyword.iskeyword(ozwald) False print(keyword.kwlist) False, None, True, and, as, assert, break, class, continue, def, del, elif, else, except, finally, for, from, global, if, import, in, is, lambda, nonlocal, not, or, pass, raise, return, try, while, with, yield,通过关键字模块输出python关
45、键字,帮助我们认识到python语言中那些单词是有特殊意义的,我们定义变量和函数时需要避开重名。,PYTHON学习,52,4. 随机函数模块 random,random 返回制定范围的随机值, import random print(random.randint(1, 100) 58 print(random.randint(100, 1000) 861,choice 从列表随机取出一个项目, import random desserts = ice cream, pancakes, brownies, cookies, candy print(random.choice(desserts)
46、brownies,Shuffle 把列表洗牌重新排序, import random desserts = ice cream, pancakes, brownies, cookies, candy random.shuffle(desserts) print(desserts) pancakes, ice cream, candy, brownies, cookies,PYTHON学习,53,5. 系统模块对控制台进行操作 sys,exit 关闭控制带, import sys sys.exit(),stdin.readline 从控制台读入输入信息, import sys v = sys.st
47、din.readline() He who laughs last thinks slowest print(v) He who laughs last thinks slowest,stdout.write 把内容输出到控制台, import sys sys.stdout.write(What does a fish say when it swims into a wall? Dam.) What does a fish say when it swims into a wall? Dam.52, import sys print(sys.version) 3.1.2 (r312:7914
48、9, Mar 21 2013, 00:41:52) MSC v.1500 32 bit (Intel),version 显示系统版本,PYTHON学习,54,6. 时间模块 time-1,time 取得现在时间, import time print(time.time() 1300139149.34, def lots_of_numbers(max): u t1 = time.time() v for x in range(0, max): print(x) w t2 = time.time() x print(it took %s seconds % (t2-t1) lots_of_numb
49、ers(1000),January 1, 1970, at 00:00:00,计算经过的时间,time.asctime 取得可读的时间, import time print(time.asctime() Mon Mar 11 22:03:41 2013, import time t = (2020, 2, 23, 10, 30, 48, 6, 0, 0) print(time.asctime(t) Sun Feb 23 10:30:48 2020,time.asctime 自己定义一个时间,PYTHON学习,55,7. 时间模块 time-2,time.localtime 取得现在时间的列表,
50、 import time print(time.localtime() time.struct_time(tm_year=2020, tm_mon=2, tm_mday=23, tm_hour=22, tm_min=18, tm_sec=39, tm_wday=0, tm_yday=73, tm_isdst=0) t = time.localtime() year = t0 month = t1 print(year) 2020 print(month) 2,time.sleep 让计算机休息一会儿, for x in range(1, 61): print(x) time.sleep(1),
51、PYTHON学习,56,8. 保存信息模块 pickle,保存map信息到文件, import pickle v game_data = player-position : N23 E45, pockets : keys, pocket knife, polished stone, backpack : rope, hammer, apple, money : 158.50 w save_file = open(save.dat, wb) x pickle.dump(game_data, save_file) y save_file.close(),从文件读取保存的信息, load_file
52、= open(save.dat, rb) loaded_game_data = pickle.load(load_file) load_file.close() print(loaded_game_data) money: 158.5, backpack: rope, hammer, apple, player-position: N23 E45, pockets: keys, pocket knife, polished stone,第十章 高级海龟绘图,PYTHON学习,57,PYTHON学习,58,1. 进阶海龟绘图,运用学到的知识试试海龟画出下面的图,第十一章 图形界面,PYTHON学
53、习,59,PYTHON学习,60,1. 什么是图形界面,你现在使用的计算机就是图形界面(例如),PYTHON学习,61,2. Python的图形界面,Python的图形包,Import tkinter,要开发图形界面,首先要导入图形包,Python的图形接口,tkniter.Tk(),创建基本的窗口,Python的窗口控件,tkniter.Button(),按键,tkniter.Canvas(),用来在窗口画图的画布,等等。,Python的窗口更新显示,xxxx.Pack(),当你画了控件xxxx后需要用执行Pack来让它显示,PYTHON学习,62,3. Python的图形界面,Python
54、的标准图形控件,PYTHON学习,63,4. 实现你的第一个图形界面,import tkinter def hello(): print(hello there) tk=tkinter.Tk() btn = tkinter.Button(tk,text=click me,command=hello,width=8,height=1) btn.pack() canvas = tkinter.Canvas(tk,width=500,height=500) canvas.pack() canvas.create_line(0, 0, 500, 500),导入tkinter,定义一个函数,在控制台输出
55、hello there,创建窗口,在窗口加入按键,尺寸为8,1 显示click 按下按键后执行hello函数,显示按键,创建画布尺寸为500,500,显示画布,在画布尺上画一条线,这是执行结果,PYTHON学习,64,5. 常用的绘图方法-1,绘制盒子,import tkinter import random tk=tkinter.Tk() canvas = tkinter.Canvas(tk,width=500,height=500) canvas.pack() def random_rectangle(width,height,fill_color): x1= random.randran
56、ge(width) y1= random.randrange(height) x2= x1+random.randrange(width) y2= y1+random.randrange(height) canvas.create_rectangle(x1,y1,x2,y2,fill=fill_color) for x in range(0,100): random_rectangle(400,400,#eb5699),PYTHON学习,65,5. 常用的绘图方法-2,绘制圆弧,import tkinter tk=tkinter.Tk() canvas = tkinter.Canvas(tk,width=500,height=500) canvas.pack() canvas.create_arc(10,10,200,80,extent=359,style=tkinter.ARC) canvas.create_arc(100,100,200,200,extent=359,style=tkinter.ARC),参数的意义 1.图形左上角坐标 2.图形右下角坐标 3.绘制角度 4.绘制圆弧常量,PYTHON学习,66,6. 常用的
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 山东青年政治学院《景观生态学原理与应用》2023-2024学年第一学期期末试卷
- 西安财经大学行知学院《数据库应用》2023-2024学年第一学期期末试卷
- 石家庄科技信息职业学院《马克思主义经典著作选读》2023-2024学年第一学期期末试卷
- 山东电力高等专科学校《地下水开发利用》2023-2024学年第一学期期末试卷
- 上海纽约大学《创新创业与就业指导》2023-2024学年第一学期期末试卷
- 河北建筑工程学院《中国画材料与技法》2023-2024学年第一学期期末试卷
- 重庆移通学院《乐器演奏》2023-2024学年第一学期期末试卷
- 黑龙江旅游职业技术学院《数据结构课》2023-2024学年第一学期期末试卷
- 消防圣诞元旦活动方案
- 洗衣店年尾营销活动方案
- 初二上册物理知识点课件
- 专利转化意向协议书
- 禁毒与防电诈课件
- 高二年级主任述职报告
- 税务稽查面试试题及答案
- 道路改扩建工程施工方案与技术措施
- 十八项核心制度解读医疗质量安全核心制度要点
- 新媒体创作汇报
- 《古巴导弹危机》课件
- 热力行业安全培训课件
- 护理管理的发展史
评论
0/150
提交评论