background preloader

How to Think Like a Computer Scientist — How to Think Like a Computer Scientist: Learning with Python 2nd Edition documentation

How to Think Like a Computer Scientist — How to Think Like a Computer Scientist: Learning with Python 2nd Edition documentation
Navigation How to Think Like a Computer Scientist¶ Learning with Python¶ 2nd Edition (Using Python 2.x) by Jeffrey Elkner, Allen B. Downey, and Chris Meyers Last Updated: 21 April 2012 Copyright NoticeForewordPrefaceContributor ListChapter 1 The way of the programChapter 2 Variables, expressions, and statementsChapter 3 FunctionsChapter 4 ConditionalsChapter 5 Fruitful functionsChapter 6 IterationChapter 7 StringsChapter 8 Case Study: CatchChapter 9 ListsChapter 10 Modules and filesChapter 11 Recursion and exceptionsChapter 12 DictionariesChapter 13 Classes and objectsChapter 14 Classes and functionsChapter 15 Classes and methodsChapter 16 Sets of ObjectsChapter 17 InheritanceChapter 18 Linked ListsChapter 19 StacksChapter 20 QueuesChapter 21 TreesAppendix A DebuggingAppendix B GASPAppendix c Configuring Ubuntu for Python DevelopmentAppendix D Customizing and Contributing to the BookGNU Free Document License Search Page © Copyright 2010, Jeffrey Elkner, Allen B.

Related:  Startup LearningPythonPython-abilia

HTML components · cambridge-healthcare/grunt-stencil Wiki This page describes the components Stencil uses to generates HTML output files. Pages Pages are the input files given to stencil which map directly to output files (for each given page, a single output file is compiled). String Formatting - Learn Python - Free Interactive Python Tutorial Python uses C-style string formatting to create new, formatted strings. The "%" operator is used to format a set of variables enclosed in a "tuple" (a fixed size list), together with a format string, which contains normal text together with "argument specifiers", special symbols like "%s" and "%d". Let's say you have a variable called "name" with your user name in it, and you would then like to print out a greeting to that user. # This prints out "Hello, John!" name = "John" print "Hello, %s!" % name

Key-Value Observing Programming Guide: Introduction to Key-Value Observing Programming Guide Key-value observing is a mechanism that allows objects to be notified of changes to specified properties of other objects. Key-value observing provides a mechanism that allows objects to be notified of changes to specific properties of other objects. It is particularly useful for communication between model and controller layers in an application.

Python Lists The most basic data structure in Python is the sequence. Each element of a sequence is assigned a number - its position or index. The first index is zero, the second index is one, and so forth. Python has six built-in types of sequences, but the most common ones are lists and tuples, which we would see in this tutorial. There are certain things you can do with all sequence types. These operations include indexing, slicing, adding, multiplying, and checking for membership.

Key-Value Observing Programming Guide: KVO Compliance In order to be considered KVO-compliant for a specific property, a class must ensure the following: The class must be key-value coding compliant for the property, as specified in “Ensuring KVC Compliance”.KVO supports the same data types as KVC.The class emits KVO change notifications for the property.Dependent keys are registered appropriately (see “Registering Dependent Keys”). There are two techniques for ensuring the change notifications are emitted. Automatic support is provided by NSObject and is by default available for all properties of a class that are key-value coding compliant. Typically, if you follow standard Cocoa coding and naming conventions, you can use automatic change notifications—you don’t have to write any additional code. Manual change notification provides additional control over when notifications are emitted, and requires additional coding.

Python for Software Design: How to Think Like a Computer Scientist How to Think Like a Computer Scientist by Allen B. Downey This is the first edition of Think Python. It uses Python 2, with notes on differences in Python 3. UIKit User Interface Catalog: Image Views An image view displays an image or an animated sequence of images. An image view lets you efficiently draw an image (such as a JPEG or PNG file) or an animated series of images onscreen, scaling the images automatically to fit within the current size of the view. Image views can optionally display a different image or series of images whenever the view is highlighted. The Python Wiki Python is a great object-oriented, interpreted, and interactive programming language. It is often compared (favorably of course ) to Lisp, Tcl, Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's much more fun. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems .

Concepts in Objective-C Programming: Object Initialization Initialization sets the instance variables of an object to reasonable and useful initial values. It can also allocate and prepare other global resources needed by the object, loading them if necessary from an external source such as a file. Every object that declares instance variables should implement an initializing method—unless the default set-everything-to-zero initialization is sufficient.