自定义博客皮肤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)
  • 收藏
  • 关注

原创 turtle乌龟模块画长方形

>>> import turtle >>> bob = turtle.Turtle() 运行上述例子的时候,应该就能新建一个小窗口,还有个小箭头象征小乌龟。如果有的话就 对了,把窗口关掉吧先。 建立一个叫做mypolygon.py的文件,在里面输入如下内容:import turtle bob = turtle.Turtle() #这个小乌龟模块(记着是小写的t)提供了一个叫做Turtle(注意这里是大写的,大小写要去分!)的函数,这..

2021-12-11 15:26:14 1179

原创 MIT/Unit 7: Plotting/13. Plotting

Video: PylabVideo: Labels

2021-11-08 17:46:31 74

原创 MIT/Unit 6: Algorithmic Complexity/12. Searching and Sorting Algorithms

Video: Bogo SortVideo: Bubble SortVideo: Selection Sort

2021-11-08 16:34:20 80

原创 MIT/Unit 6: Algorithmic Complexity/11. Computational Complexity

Video: Program EfficiencyVideo: Big Oh NotationVideo: Complexity ClassesVideo: More Analyzing ComplexityVideo: Recursion Complexity...

2021-11-07 20:08:00 146

原创 MIT/Unit 5: Object Oriented Programming/10. An Extended Example

Video: Building a ClassVideo: Visualizing the Hierarchy

2021-11-05 17:58:08 201

原创 MIT/Unit 5: Object Oriented Programming/9. Classes and Inheritance

Video: Class Instances

2021-10-21 17:56:15 68

原创 MIT/Unit 4: Good Programming Practices/8. Exceptions and Assertions

Exercise 2

2021-10-13 17:52:07 76

原创 MIT/Unit 4: Good Programming Practices/7. Testing and Debugging

2021-10-03 16:52:27 67

原创 Course/Unit 3: Structured Types/6. Dictionaries

低效的fibonacci以下为递归和字典效率比较

2021-09-28 17:58:23 59

原创 MIT/Unit 3: Structured Types/5. Tuples and Lists

x = (1, 2, (3, 'John', 4), 'Hi')x[2][2]意思是顺序第2个元素里面的第二个元素。x = (1, 2, (3, 'John', 4), 'Hi') 0 1 2 3 0 1 2 01 ...

2021-09-27 10:34:16 53

原创 Course/Unit 2: Simple Programs/4. Functions (TIME: 1:08:06)

Calling Functions and ScopeKeyword ArgumentsIteration vs Recursion

2021-09-25 16:43:35 57

原创 MIT/Unit 1: Python Basics/Problem Set 1

Problem 1s='azcbobobegghakl'vowels=0for char in s: if char=='a' or char=='e' or char=='i' or char=='o' or char=='u': vowels+=1 print("Number of vowels:"+ str(vowels))Problem 2s = 'azcbobobegghakl'vowels = 0star = 0end = 3while(...

2021-09-22 10:19:16 78

原创 MIT/Unit 2: Simple Programs/3. Simple Algorithms

以上 2种写法。二分法二分法减少计算step。

2021-09-22 10:18:35 41

原创 python Iteration迭代笔记

笔记说明:1、循环缩进部分,4line-6line2、循环结束,输出print3、test: iter=3, 满足!=0,则ans=0+3=3, iter=3-1=2循环1: iter=2,满足!=0,则ans=3+3=6, iter=2-1=1循环2: iter=1,满足!=0,则ans=6+3=9, iter=1-1=0循环3:iter=0,不满足!=0,输出print结果。注意,while前的条件,仅第1次带入条件,然后用循环中的结果进行再循环。...

2021-09-18 12:31:06 229

原创 Python Basics 笔记

问题:>>> s = 'Python is Fun!'>>> s[1:5]'ytho'>>> s[:5]'Pytho'>>> s[1:]'ython is Fun!'>>> s[:]'Python is Fun!'>>> s = 'Python is Fun!'>>> s[1:12:2]'yhni u'>>> s[1:12:3]'.

2021-09-15 16:17:00 177

空空如也

空空如也

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

TA关注的人

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