Python Programming Reloaded: How to Code Python Fast In Just 24 Hours With 7 Simple Steps
by Jason Scotts
Table Of Contents
Do you want to be called a Pythoneer, Pythonista, or Pythonist? Then you should read this book! It contains and explains simple concepts on how you can learn to code Python in a matter of 24 hours given that you would not sleep.
Python is a high-level programming language. It is a general-purpose language, and applications made from it can operate on multiple platforms or operating systems.
Guido van Rossum conceived this language around 1980. Guido van Rossum is one of the few BDFLs (Benevolent Dictators for Life) in the world. Around 1990, few developers made use of Python after its implementation in 1989. When Python 2.0 was released in 2000, its popularity rose, and it has obtained a supportive community. On December 3, 2008, its third version was released.
In contrast to other programming languages, Python is considered very readable. Even people with little experience in programming can be able to understand lines of codes made in Python. Also, it focuses in letting its programmer to find the only obvious way to execute a function. The philosophy behind Python dejects the mindset of having more than one way to do something.
On the other hand, Python is as straightforward as it gets. When programming using this language, you will not need to declare or include any required code for a certain function to run.
Instead of using curly braces to write a block of code, a user only needs to indent the lines. This takes away some of the clutter and forces the developer to write an easy-to-read code. However, the tab character is not allowed to be used. The user needs to use spaces instead.
Within 24 Hours
You do not need to internalize too much on this book; just scan it once. After that, read it once with your computer. Follow the instructions, and you will not get lost. And within three to four hours, you will surely understand most of the things written here. Then, you will probably spend the next three hours trying out your own ideas. Sequentially, you will find yourself grinning smiling triumphantly because of the success of your first ever program. And it did not even take you a day.
To learn how to program Python, you will need a few things:
Computer
Writing scripts and programs can be done easier with a computer. Also, you will need to install Python on a computer for you to be able to run and test the lines of codes you will write.
Internet Connection
You will need to connect to the internet for you to download the Python installer. The site you will visit is http://www.python.org/download/ . Depending on your computers operating system, choose the installer you want to download. Python is available for the following operating systems:
Windows 32bit
Windows 64bit
MAC OS X
Linux
By the way, in that download page, you can download two stable versions of Python. The versions are 2.7.5 and 3.3.2. For this tutorial, you will need to get the 2.7.5 version. It will be best if you will download the 3.3.2 version, too, for future use and reference. However, for this tutorial, you will only need to install 2.7.5. Installing two Python versions in the same computer might bring some complications.
On the other hand, you will need the internet for you to access various Python tools that will make you understand Python faster and easier. One of those tools is the Python Visualize tool. You can find this neat utility at http://www.pythontutor.com/visualize.html . The Visualizer will allow you to view your programs in a different way. In there you can navigate what happens to your program step by step. The page will contain a code window, output window, and a variable window.
That is only one of the few tools you might need in the future. Alternatively, you can continue learning Python on the web. However, before you do that, you must master the fundamental concepts that will be discussed in this book. Even though you can find basic tutorials like this on the internet, this book is the best learning material for you. It is geared towards people who are a bit new in the programming world typically students, hobbyists, and some who just decided to program something.
Word Processor
MS Windows Notepad is preinstalled in Windows operating systems, so if you are using any of those OSs, you can just run it from the Windows Start or Orb menu. On the other hand, you can get Notepad++ from notepad-plus-plus.org. It is freeware, so you can just download its installation file from the website, and install it in your computer.
The good thing about Notepad++ is that it has syntax highlighting and multi-document features. The first one allows you to set Notepad++ to highlight syntaxes and reserved words for Python, which can make it easier for you to read and write blocks of codes. The second feature allows you to edit multiple documents a feature that the regular Notepad does not have since it can only open one file at a time.
The tutorial will mostly revolve around people who use Windows operating systems. To get Python, just visit http://www.python.org/download/ and download the installer for Windows. Once the download is finished, open the files, and wait for your computer to show the Python installation window. Just follow the steps indicated on the installer, and it is best for you to leave the default settings on the installation. By the way, you need to remember the installation path since you might need to visit that path later on in this tutorial. After a few seconds of installation, Python should be installed on your system.
Skill Requirement
To breeze through this tutorial you will need the following skills:
Familiarity with Microsoft Windows command prompt
Mastery of basic arithmetic
Understanding of programming fundamentals
There are two ways you can practice coding for Python. The first way is to type commands directly to the Python command line, and the second way is to write your code using a text editor.
Interactive Programming Mode
To use the interactive programming mode, you will need to run the Python.exe file that is located on your Python folder. Once you do, the Python interpreter window will pop up. The interpreter window looks similar to MSDOS. The only difference is that the character that indicates the command line is the symbols >>> without the quotation marks instead of the regular C:\>. Below is what you will see in the interpreter window if you open Python.exe.
Python 2.7.5 (default, January 1, 2000, 00:00:00) [MSC v.1500 32 bit (Intel)] on win32
Type help, copyright, credits or license for more information.
>>> _
This mode will allow the programmer to program line by line. Every line of code that the developer will type will be executed immediately once the user presses enter. Once the interpreter finishes on executing the line of code, it will immediately return, process, or show the result.