After learning C language and C language data structure and algorithm to learn python, feel that the core content of programming has not changed, but each programming language has its own characteristics. The goal of this study is to understand the characteristics and usage of Python, to record the BIF (built-in function) usage, and finally to implement some practical uses of Python. Tutorial Video: Little Turtle Python,python version 3.7
Command+n Write page run (F5) execution
The difference between ' and '
Represents a string, no difference. ' Hello ' and ' hello ' are the same for Python. but with "" This, it can be used, like "Let's Go"
1.print ()
>>> ni=3
>>> fa=2
>>> Print (FA)
2
>>> Print (Fa+ni)
5
>>> ni= ' q '
>>> fa= ' W '
>>> Print (NI+FA)
Qw
>>> print (' Ni+fa ')
Ni+fa
Variables are placed directly in print, and text variables are concatenated with the + sign
2.input () display and input can be a=input ()
3. If format
If condition: Condition +:
(tab) Execution statement
(tab) Executes the statement before the tab is executed under the IF condition
.....
Else
(tab) EXECUTE Statement
.......
1 Print('Hi')2temp= input ("Number ?")3guess=Int (temp)4 ifGuess==8:5 Print("Yes")6 Else:7 Print(" on")8 Print(" the")9
Python Print input int