MIS 304 Lecture Notes - Lecture 7: Turtle Graphics, Boolean Expression, Relational Operator
Document Summary
Control structure: a logical design that controls the order in which a set of statements execute. Sequence structure: a set of statements that execute in the order in which they appear. Decision structure (selection structure): a specific action is performed only if a certain condition exists. Single alternative decision structure: only provides one alternative path of execution. Dual alternative decision structure: has two possible paths of execution, one path if condition is true and another path if false. Some statements are executed only if certain conditions are met. A condition is met if it evaluates to true. A set of statements that belong together as a group. Relational operators: allow comparisons between two values and evaluate to true or. You can compare strings alphabetically (comparing ascii codes) if-elif-else statement. Use instead of a long series of if-else statements. Disadvantages of long series of if-else statements. Code can grow complex and difficult to understand.