elif guess​ ​ ​ print​ ​ ("Too​ print​ ("Too​ ​ Control Structures: Programming​ Python​ performs​ “loop”​ ​ specified​ while a condition​ true.​ Run​ “blastoff”​ ​ ​ ​ ​ ​ ​ ​ loop ​ ​ ​ ​ Example: while >=​ 0:​ ​ ​ ​ print​ ​ ​ print​ ("Blastoff!") We​ ​ hundred​ variable​ we Note: Not initializing x or counter​ ​ ​ ​ ​ ​ ​ counter (assigning a starting value for each) before the begins will produce an error (why?).​ ​ ​ Example: x​ counter​ while x​ <​ 100:​ ​ ​ ​ x​ ​ = ​ ​ ​ ​ #It is important to NOT indent the next statement. It is not part of the loop. print​ ("There​ "multiples​ Another popular type of loop in which the iteration (repetition) is controlled by counting or enumeration is a for loop. ​ ​ Example:
elif ​ guess​ ​ ​ print​ ("Too​ ​ print​ ("Too​ Control Structures: Programming​ Python​ “loop”​ ​ while a ​ specified​ ​ condition​ ​ ​ true.​ ​ Run​ ​ ​ “blastoff”​ ​ ​ ​ ​ Example: while ​ ​ >=​ ​ 0:​ ​ print​ ​ print​ ("Blastoff!") We​ ​ hundred​ ​ ​ ​ variable​ ​ ​ we ​ counter​ Note: Not initializing x or counter (assigning a starting value for each) before the loop begins will produce an error (why?).​ ​ ​ Example: x​ counter​ while ​ x​ ​ <​ ​ 100:​ ​ x​ ​ ​ ​ ​ #It is important to NOT indent the next statement. It is not part of the loop. print​ ("There​ "multiples​ Another popular type of loop in which the iteration (repetition) is controlled by counting or enumeration is a for loop. ​ ​ Example: performs​ =
Intoduction-to-Python-v3-3-30-18.docx