download.51testing.comdownload.51testing.com/ddimg/uploadsoft/20160718/pyt…  · Web view【Python 第51课】 and-or技巧123 【Python 第52课】 元组124 ... 的IDE,Word就是doc

Embed Size (px)

Citation preview

Python 16

Python 2print7

Python 3IDE10

Python 412

Python 514

Python 6bool16

Python 7if19

Python 8while23

Python 9random26

Python 10 228

Python 11 29

Python 12 for30

Python 13 32

Python 14 34

Python 15 35

Python 16 237

Python 17 38

Python 18 bool40

Python1941

Python2146

Python2247

Python23if,elif,else49

Python24if54

Python25list56

Python26list58

Python2865

Python29list71

Python 30 72

Python 31 74

Python 32 76

Python 33 77

Python 34 break83

Python 35 continue84

Python 36 87

Python 37 90

Python 38 93

Python 39 196

Python 40 298

Python 41 3101

Python 42 105

Python 43 1107

Python 44 2108

Python 45 3111

Python 46 4113

Python 47 1116

Python 48 2117

Python 49 3118

Python 50 4120

Python 51 and-or123

Python 52 124

Python 53 125

Python 54127

Python 55 1128

Python 56 2130

Python 57 3131

Python 58 4134

Python 59 5135

Python 60 137

python139

30140

140

141

141

142

142

143

144

146

146

146

147

147

148

148

149

150

151

151

152

/152

154

155

155

155

Python 0Why Python

Python

Googlewhy pythonC++JavaPython

Python_5Python

PythonPythonHead First PythonHead First

Python 1

Pythonhttp://www.python.org/download/

Python 2.7.5 Windows Installer64Python 2.7.5 Windows X86-64 Installer3.3.2python2.7.xpython3

NextC\python27\

""->""->""Path;C:\Python27\

Python->->->Win+rWinCtrlAltwindowscmd

pythonPython 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32

print Hello WorldPython

Googlepython onlineExecute Python Script Onlinecompileonline.comPythonhttp://www.compileonline.com/execute_python_online.phppythonExecute Sctipt

MacMacTerminalMacTerminalpythonpython

pythonHello World

compileonline.comhttp://www.pythonfiddle.comMacMacTerminalspotlightTerminalpython

Python 2print

printpythonprintpython print print()

pythonIDE>>>

>>> print "hello"hello>>> print 'world'world>>> print 11>>> print 3.143.14>>> print 3e303e+30>>> print 1 + 2 * 37>>> print 2 > 5False

printprintprint

pythonprint>>> 'Your YiDa!''Your YiDa!'>>> 2+13+250265>>> 5->Python 2.7printprint

File->New Windowpythonprintprint

print 'Hello'print 'IDE'print 'Here I am.'

Run->Run ModuleF5lesson3.py.pypython.py

IDLEFile->Open....py

MacIDLEIDLEWindows/usr/binIDLEpythonIDLEMac

WindowsIDEPyScripterhttp://code.google.com/p/pyscripter/IDLE.py

IDE

pythonIDE

Python 4

print

pythoninput()print()

pythonIDLEIDE

print "Who do you think I am?"input()print "Oh, yes!"

RunForrest Runinput

print''""

pythonraw_input()

"Idiot""Oh, yes!"

print

1. WinCMDMacTerminalpython

2. IDEpythonIDLEIDEpy

3. compileonlinepythonfiddleIDEcompileonlinedownload filespythonfiddle

Python 5

Python

python:

name = 'Crossin'myVar = 123price = 5.99visible = True

=

4python

- ''""

-

bool - TrueFalse

printprint

name = 'Crossin'print name

nameCrossinprintprint

a = 123print aa = 'hi'print a

=:

value = 3 * 4print valuevalue = 2 < 5print value

input():

name = input()print name

print "Who do you think I am?"you = input()print "Oh, yes! I am a"print you

Python 6bool

pythonbool

boolTrue / Flase

a = 1 < 3print ab = 1c = 3print b > c

>=