1. Introduction All the programs you have studied so far in this class have consisted of short sequences of instructions that are executed one after the other. Even if we allowed the sequence of instructions to be quite long, this type of program would not be very useful. As human beings, computers must be able to repeat a set of actions. They also must be able to select an action to perform in a particular situation. This lecture focuses on control statements—statements that allow the computer to repeat an action.
2. Definite Iteration: The for Loop Repetition statements (also known as loops), which repeat an action. Each repetition of the action is known as a pass or an iteration. There are two types of loops—those that repeat an action a predefined number of times (definite iteration) and those that perform the action until the program determines that it needs to stop (indefinite iteration). In this section, we examine Python’s for loop, the control statement that most easily supports definite iteration.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|