Objective
Python is a cross-platform language
Install Python (Mac OS X)
1. Download python in www.python.org/downloads and install it like any other software.
2. Open: Locate the Python 2.7.X folder, double-click Idle, and wait for the idle load to complete.
Create your first program
After idle loading, the Python Shell.shell is opened where the Python command is entered.
The command prompt indicates that the computer is ready to receive user commands. Command prompt for Python:>>>
Chapter One deep into Python
Python is case sensitive.
When idle, each time you have to write a single line of code, you can use the file editor in idle, not the shell
Ways to Use the file editor
1. Click file-"New FIle" in the menu bar
2. Enter your code in the pop-up editor and do not need to >>>
3. Menu bar Select Run-"Run module
4. If a saved window appears, select Save
After a few moments, the Phtyon shell appears and prints the information.
Raw_input () function
The Raw_input () function can be used to enter a string after the prompt
SELECT statement (if,else,elif)
Note the point: 1. Indent 2. Colon
If name = = "ZQL": print "hello!"
Loop statement (while)
Note points: 1. Indent (4) 2. Colon
While True: print "Hello"
"0 Basic Learning Python" 01