INFO1110 Lecture Notes - Lecture 3: Control Flow, Boolean Expression, Gnu Readline

55 views4 pages

Document Summary

Control low and ile i/o if elif else statements. Allows the program to execute different code based on a condition (a control statement), a boolean expression that evaluates to true or false. if : A table used to track each variable and how they change. When used in testing, pick values that are normal, abnormal, or on the boundaries. while loops. Repeat a section of code while the condition is true. while : Repeating something in a systematic way. break and continue break. When used in loops, it means break from the current iteration of this loop or exits the loop. continue. When used in loops, it means skip the rest of this iteration and continue to the next one. # using break while true: line = input() if len(line) == 0: break. # checking length of line as the condition line = input() while len(line) != 0: line = input()

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents