Python Notes

Topics: C, For loop, Variable Pages: 70 (10999 words) Published: December 8, 2012
Programming with Python
Chapter One
Introducing Python
* Powerful yet easy to use programming language
* Developed by Guido van Rossum
* First released in 1991
* Named after comedy troupe Monty Python
* An alarming number of references to spam, eggs, and the number 42 in documentation

Why Python? It’s Easy to Use

* High-level language: Distinct from the low-level processor operations; closer to human language than machine language * "Programming at the speed of thought"
* Increases productivity
* Python programs three to five times shorter than Java * Python programs five to ten times shorter than C++
* Normally, “Programming is like making fine furniture with an axe and a nail file.” * Python makes it more like working with a table saw & a lathe * You still have to learn how to use them, but they’re the right tools for the job

Python Is Easy to Use

* Python Program
print "Game Over!"
* C++ Program
#include <iostream>
int main()
std::cout << "Game Over!" << std::endl;
return 0;

Python Is Powerful

* Used by large organizations
* Google
* Microsoft
* Used in published games
* Battlefield 2
* Civilization IV
* Disney’s Toontown Online
* Used throughout academia and the scientific community

Python Is Object-Oriented

* Object-oriented programming (OOP): Methodology that defines problems in terms of objects that send messages to each other * In a game, a Missile object could send a Ship object a message to Explode * OOP not required, unlike Java and C#

Python Is a “Glue” Language

* Can be integrated with other languages
* C/C++
* Java
* Use existing code
* Leverage strengths of other languages
* Extra speed that C or C++ offers

Python Runs Everywhere

* Platform independent: Independent of the specific computer operating system * Python runs on
* Windows
* Mac OS X
* Linux
* Many more

Python Has a Strong Community

* As an approachable language, has approachable community * Python Tutor mailing list
* Perfect for beginners
* No actual "tutors" or "students"

Python Is Free and Open Source

* Open source: Publicly available; open source software typically programmed by volunteers; anyone can use source code without fee * Can modify or even resell Python
* Embracing open-source ideals is part of what makes Python successful

Python is Popular

* All those advantages make Python a commonly used (and liked) language Java

Installing Python

* Do NOT install anything from the textbook’s CD-ROM
* Instead, follow the instructions on the class web page
* Don’t have to worry about PyGame & LiveWires yet * Windows
* Go to
* Download the latest “standard” (aka “production”) release installer (.msi file) --e.g. Python 2.6.4 * Double-click the installer program and follow its instructions to install Python on your boot (C:) drive * Linux

* Python probably already installed
* Test: try running python at command prompt
* If not installed, go to (you will probably need to build from source) * Mac OS X
* For 10.5.x or 10.6.x follow the instructions on the class web site (install Enthought Python Distribution and replace IDLE) * For earlier versions download appropriate version from Python web site at

Introducing IDLE
* Integrated Development Environment (IDE): Application that helps software developers write programs * Like a word processor for your code
* IDLE is the IDE that...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Python Essay
  • Python for Kids Essay
  • Learning Python Essay
  • A Quick Rundown of Python Essay
  • Essay on Note Taking Skills
  • Journal on Note Taking Essay
  • Essay about Taking Notes in College
  • Note taking Essay

Become a StudyMode Member

Sign Up - It's Free