编程笔记
LeonZ8201
这个作者很懒,什么都没留下…
展开
-
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 评论 -
IIPP Week 3 - Canvas, drawing, timers
Canvas and DrawingThe origin for canvas is always in the upper left.Always drawing while startingTo draw test canvas.draw_text(text, point, font_size, font_color)To draw circle canvas.draw_circle原创 2017-07-03 17:22:30 · 346 阅读 · 0 评论 -
IIPP Week 2 - Event-driven programming, local/global variables
Week 2a - Interactive Application in PythonEvent-driving programmingdefinationInitialize everything and waite events to run the programWhat is eventInput buttontext boxKeyboard key downkey upMou原创 2017-06-30 14:48:13 · 544 阅读 · 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 评论