day-4 (Section 1-3) and supplemental content review

'' ' 
1 programming language
Advanced:
lower:
2.python type
1.Javapython
2.cPython
3.pypy
3.python program
1. implementation
1. registration period performed by the full path
Example:
C: \ python37 \ python.exe (python installation file) D: \ 1.py (the directory to write a program)
2. interpreter:
Example:
C: \ python37 \ python.exe
2 encoding (need to add on top) #
- * - coding: utf8 - * - (plus header)
# / usr / bin / the env Python!
added:
relationship between bits and bytes
the Unicode
UTF8: Chinese three bytes
GBK: two bytes
4.print ( '-')
. 5. inp = input ( '-')
received string type is
how to convert a string of digital:
New- int = InP (InP)
6. the variable name
1. type
1. letters
2. Digital
3. the change line
2. requirements.
1. The digital word can not
2 can not use the keyword
3. Do not use the built-in python
7. conditional statement
1. Basic ......
2. Nested ......
3.If the else ... elif
8.while loop
while condition:
Print ( "-")
added:
1.
COUNT = 0
while COUNT <10:
Print (COUNT)
COUNT = COUNT +. 1
the else:
Print ( 'the else')
Print ( 'XXX')
2.
1.count terminate the current cycle, the next cycle begins
COUNT = 0
the while COUNT <10:
IF COUNT ==. 7:
COUNT = COUNT +. 1
Continue following code is not executed # skip ahead while
2.break terminate all cycles
' ''
# Log operations to achieve
COUNT = 0
the while COUNT <3:
the User the INPUT = ( 'username')
pwd = the INPUT ( 'password')
IF the User == 'alex' and pwd == '123456':
Print ( 'Welcome')
BREAK
the else:
Print ( 'login name or password is incorrect')
COUNT = COUNT + 1

Guess you like

Origin www.cnblogs.com/pythonzhao/p/11620975.html