@[TOC] Three process control )
Read in code order
1、 General flow chart
2、 Ternary branch
Example 1
Example 2
practice
Code requirements : 1. The number of user codes and passwords 2. Determine whether the user name and password are correct ( user name =wadmin, password =westos) 3. If correct :“ user admin Login successful ” 4. If not :“ user admin Login failed ”
Example 1 while loop
Example 2 Dead cycle
while ture It means always executing
The user successfully logged in and entered the system , Login failed , Continue to log in
Example 3 Output numbers from 1 To 100
range function
Example 4 for loop
Example 5 for Loop through the string
Example 6 while and else Combined cycle
1、break Jump out of all loops
2、debug Step by step debugging
3,continue: End this round ahead of schedule continue All the code after that
1、 Example to find 99 multiplication table
Ideas :
i from 1 To 9
Every j from 1 To i
2、 Check whether the user name and password are respectively admin and westos, If it is correct, successful login will be displayed , An error displays login failure . If it is more than three times, it shows that the login is more than 3 Time , immediate withdrawal .
author : Operation and maintenance technology - Chen Gong
Game programming , A game development favorite ~
If the picture is not displayed for a long time , Please use Chrome Kernel browser .
Detailed explanation python3 A
Resource download address :htt
Catalog One . Introduction to