background preloader

Python for Fun

Python for Fun
This collection is a presentation of several small Python programs. They are aimed at intermediate programmers; people who have studied Python and are fairly comfortable with basic recursion and object oriented techniques. Each program is very short, never more than a couple of pages and accompanied with a write-up. I have found Python to be an excellent language to express algorithms clearly. Some of the ideas here originated in other programs in other languages. From many years of programming these are some of my favorite programs. Many thanks to Paul Carduner and Jeff Elkner for their work on this page, especially for Paul's graphic of Psyltherin (apologies to Harry Potter) and to the teams behind reStructured text and Sphinx to which the web pages in this collection have been adapted. Chris Meyers

Book Natural Language Processing with Python – Analyzing Text with the Natural Language Toolkit Steven Bird, Ewan Klein, and Edward Loper This version of the NLTK book is updated for Python 3 and NLTK 3. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Bibliography Term Index This book is made available under the terms of the Creative Commons Attribution Noncommercial No-Derivative-Works 3.0 US License. 5 Reasons Why You Should Learn Python Programming | Programming Tips That Help You Become a Better Programmer digg If you are new to Python programming or in computer programming in general, it would certainly be important for you to get some information on the advantages and disadvantages of the language and understand why would somebody want to use it. In this post, i will not enter into the technical details of the language nor use fancy words to describe you some of the language specifics. There are some very good reasons for which you would want to use python that i will be enlisting for you below : (please bear in mind that there might be more reasons why one should use python, but this is what i feel about the language based on my own experience with it) This is one of the most important things about Python and is in fact one of the main reasons why this is a very solid first programming language choice. As you become more competent in Python programming, you will notice that you can code some pretty complicated scripts that do lots of work for you in a matter of hours or even minutes.

Invent Your Own Computer Games with Python - Chapters Chapter 1 Read online: Chapter 1 - Installing Python Videos: Chapter 2 Read online: Chapter 2 - The Interactive Shell Chapter 3 Read online: Chapter 3 - Strings Download source: hello.py Copy source to clipboard: Use the online diff tool to find typos in your code: hello.py Chapter 4 Read online: Chapter 4 - Guess the Number Download source: guess.py Use the online diff tool to find typos in your code: guess.py Chapter 5 Read online: Chapter 5 - Jokes Download source: jokes.py Use the online diff tool to find typos in your code: jokes.py Chapter 6 Read online: Chapter 6 - Dragon Realm Download source: dragon.py Use the online diff tool to find typos in your code: dragon.py Chapter 7 Read online: Chapter 7 - Using the Debugger Chapter 8 Read online: Chapter 8 - Flow Charts Chapter 9 Read online: Chapter 9 - Hangman Download source: hangman.py Use the online diff tool to find typos in your code: hangman.py Chapter 10 Read online: Chapter 10 - Tic Tac Toe Download source: tictactoe.py Chapter 11 Download source: bagels.py

Head First Design Patterns - Google Book Search How to Think Like a Computer Scientist Learning with Python by Allen Downey, Jeff Elkner and Chris Meyers. This book is now available for sale at Lulu.com. How to Think... is an introduction to programming using Python, one of the best languages for beginners. How to Think... is a Free Book available under the GNU Free Documentation License. Please send suggestions, corrections and comments about the book to feedback{at}thinkpython{dot}com. Download The book is available in a variety of electronic formats: Precompiled copies of the book are available in PDF and Postscript . Translations Here are some translations of the book into other (natural) languages: Spanish translation by Gregorio Inda. Other Free Books by Allen Downey are available from Green Tea Press. If you are using this book and would like to make a contribution to support my work, please consider making a donation toward my web hosting bill by clicking on the icon below.

The Python Tutorial — Python v2.6.1 documentation Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). This tutorial introduces the reader informally to the basic concepts and features of the Python language and system.

Hacking Secret Ciphers with Python - Chapters Chapter 1 Read online: Chapter 1 - Making Paper Cryptography Tools PDF of the Caesar Cipher WheelInteractive Virtual Cipher Wheel Chapter 2 Read online: Chapter 2 - Downloading and Installing Python Download Python 3Download pyperclip.py Chapter 3 Read online: Chapter 3 - The Interactive Shell Chapter 4 Read online: Chapter 4 - String and Writing Programs Download source: hello.py Copy source to clipboard: Use the online diff tool to find typos in your code: hello.py Chapter 5 Read online: Chapter 5 - The Reverse Cipher Download source: reverseCipher.py Use the online diff tool to find typos in your code: reverseCipher.py Chapter 6 Read online: Chapter 6 - The Caesar Cipher Download source: caesarCipher.py Use the online diff tool to find typos in your code: caesarCipher.py Download source: caesarCipher2.py Use the online diff tool to find typos in your code: caesarCipher2.py Download source: password.py Use the online diff tool to find typos in your code: password.py Download source: password2.py Chapter 7

Joe Gregorio | BitWorking | Python isn't just Java without the compile I've had several conversations recently where it's become clear to me that some people view dynamic languages like Python and Ruby as just Java without the compile step. Yes, one of the advantages of a dynamic language is the ability to drop the compile from the edit/compile/run cycle, but there is much more to it than that. [Update: Some corrections. A first-class function isn't one that is just defined outside a class, but is an object itself. Now let's not start a language war here; to be perfectly clear, I'm not calling Java a bad language nor am I impugning the skills or mental prowess of Java programmers, what I want to do is just introduce some of the abstractions that are present in Python and Ruby that are missing from Java. First-class functionsKeyword parametersDefault parametersTuplesParallel assignmentEfficient multiple return values ContinuationsUser-defined operatorsClosuresMeta-programming Let's look at each of these abstractions in detail in Python. Keyword parameters

Related: