02 review process statements and jump statements

f = open ( "02 review process", MODE = '+ W', encoding = "UTF-. 8") 
f.write ( "\ T \ tpython flow control statements \ n-"
"Python flow control statements three structures 1, sequence structure 2, 3 select statement, a loop statement \ n-"
". 1, the order of execution of a statement is the one according to the write down the code \ n-"
" 2, the select statement is based on conditional branch statements to be executed \ n-"
" 3, a loop is given loop execution condition statement block \ n "be executed to satisfy the condition
" no more than simple sequential statements introduced down performed line by line \ n "
," block select statement if the expression \ n to a second write line For example blocks executed statement: \ n-"
" a =. 5 \ # single conditional \ n-"
" IF a> 0: # behind the block of statements not missing punctuation \ n-"
" Print ( 'do you want to do' ) \ n "
" # multiple conditional \ n "
" # a = set a variable value. 5. 5 \ n "
" the while True: setting a first cycle # \ n "
"B = int (input ( 'Enter your numbers')) # guessed number input by the user \ n"
"IF b <A: # b judgment statement following statement is executed \ n is smaller than a"
"Print ( 'too small') \ n-"
"elif b> a: b is greater than # execute the following statements is determined when a statement \ n-"
"print ( 'too') \ n-"
"a == b elif : # judgment statement executed when b is equal to a following statement \ n-"
" Print ( 'guessed') \ n-"
" Analyzing statements can be nested been determined that is a statement can have N B B then determines Analyzing statement blocks of N and C can be determined in the sentence and the N D C has been determined nested \ n-"
" \ n-while loop \ n-"
" refers to a group while loop statement is executed while repeating been performed using # be careful when operating Beware statement into an infinite loop consuming memory \ the n-"
" for example: \ the n-"
" Print ( 'now there is a thing unknown number three number three of the remaining two, the number of fifty-five left three Weeks of the number of left Second, ask geometric \ the n-') \ the n-"?
" = 0 Number the \ # the n-count variable \ the n-"
" none = True \ the n-"
" the while none: # set a loop out of the loop until the condition is not satisfied \ n "
" nomber += 1\n"
"If nomber% 3 == 2 and nomber% 5 == 3 and nomber% 7 == 2: # execution conditions are selected to satisfy the following conditions are satisfied statement block \ n-"
"Print ( 'answer: this number is' , Number) \ n-"
" none False \ n-= "
" \ n-\ n-for loop # this loop most commonly used \ n-"
" loop for loop is sequentially repeated, and are normally used in the traversal sequence, and an iterative object element \ n-"
" for the object in I: example: The following Examples 99 to print a multiplication table for loop \ n-"
" \ n-\ T \ T Print ( 'multiplication table') \ n-"
" for X in Range ( 1, 10): a first iteration # 10 target loop number \ n-"
" for Y in Range (. 1,. 1 + X): \ n-"
" Print (STR (Y) + '*' + STR (X) + '=' + STR (X * Y), End = '' ') \ n-"
" Print (' ') \ n-"
" \ n-\ n-jump statement \ n-"
"break (end of the cycle) continue (jump out of this cycle) \ the n-"
" is a direct BREAK to end the current cycle is out of round continue the cycle begins the next cycle also pass an empty statement is nothing more than a placeholder ")
f.close()

Guess you like

Origin www.cnblogs.com/yexingyi/p/11165763.html