I. knowledge points: 1): While and do... The while statement determines whether or not to execute the loop body based on the true or false expression values, no matter what the expression value is, do... The while statement must be executed at least once when the while statement and do... When the while statement has the same body: if the value of the expression after the while statement is "true", the results of the two statements are the same. Otherwise, the results of the two statements are different. 2 ): in general, three types of loops can be replaced by each other. If the number of loops is specified, select for. If the number of loops is not clear, you must use other conditions to control the loop; if you must first enter the loop, after obtaining the control conditions through the loop body operation, determine whether to enter the next loop, and use do while; 3): nested loop concept of the Loop: A circular body contains another complete circular structure. Nested Description: 1) nesting can be multi-layer; 2) a loop body must be fully nested in another loop body, and cannot be cross; 3) three cycles can be nested with each other. 4): use the break statement to exit the loop in advance and execute the continue statement to end only the statements that have not been executed under the continue statement in this loop, the rest of the cycles must continue to execute the continue statement. It can only be used for loop Statement 2. problems encountered during the experiment and solutions: the loop content is always unclear when writing code, when I write the for while do while statement, I always forget the key points. After thinking, discussing, and reading the instructor's PPT, I learned a lot. Iii. Experiment experience: Most of the classes and assignments in this course use the cyclic structure and apply them in various sentence patterns. The most important thing is to analyze the structure and focus of each question in the write loop structure. A large number of exercises on cyclic structures and sentence patterns are still not skilled enough, and they have to be done in their spare time.
Assignment Summary 5