sh_03_ program counter

 

sh_03_ program counter

# Print the Python 5 times the Hello 
# 1. the definition of an integer variable, the number of the recording cycle 
I = 0 

# 2. cycle begins 
the while I <. 3 : 

    # . 1> desired code is executed in the circulation 
    Print ( " the Hello the Python " ) 

    # 2> processing counter 
    # i +. 1 i = 
    i +. 1 = # 3. look, the loop is finished, the value of the counter i is the number Print ( " after the cycle, i = D% " % i)


Guess you like

Origin www.cnblogs.com/shaohan/p/11496448.html