![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
LeonZ8201
这个作者很懒,什么都没留下…
展开
-
Python Tips
使用 type 前,先 import typesPython 里面字符串转整型 int,是直接转成对应数字而没有 +48,另外只允许 a = int(a) 的写法而不允许 a = (int)a原创 2017-07-01 20:23:55 · 304 阅读 · 0 评论 -
IIPP Week 8 - Sets and animation
Week 8a - Groups and SpritesSetDefinitionUnordered collection of data with no duplicatesmethoda = set([])a.adda.removeina.difference_update# Examples of Sets instructors = set(['Rixner', 'Warren'原创 2017-09-12 16:03:36 · 295 阅读 · 0 评论 -
IIPP Week 6 - Classes and object-oriented programming
Week 6a - ClassesObject-oriented Programming - 1Create a Classclass_obj = ClassName(...)Parameter selfself as a parameter of the method of class, which on behalf of class itselfdouble underbarThese me原创 2017-08-30 12:29:13 · 443 阅读 · 0 评论 -
IIPP Week 4 - Lists, keyboard input, the basics of modelling motion
Week 4a - Basics of ListsListCreatenone, string, listsAccesslen sliceUpdate# List reference problem#################################################### Student should enter code belowa = [5, 3, 1, -1原创 2017-07-12 16:06:01 · 278 阅读 · 0 评论 -
PC Week 1 - Required Python knowledge, coding standards, and machine grading
Core MaterialsGuidelines for Coding StyleDocumentationDocumentation strings (“docstrings”) are an integral part of the Python language. They need to be in the following places:At the top of each file原创 2017-09-19 14:00:26 · 431 阅读 · 0 评论 -
IIPP Week 5 - Mouse input, list methods, dictionaries
Week 5a - Mouse Input and More ListsMouse Inputdef click_handler(pos) frame.set_mouseclick_handler(click_handler)List Methodsinindexappendpop, remove("a") = pop(list.index("a"))原创 2017-07-19 07:48:58 · 429 阅读 · 0 评论