CSC 1100 Lecture Notes - Lecture 8: Collation, Toro Rosso Str2, Switch Statement

26 views9 pages

Document Summary

Discover how to use the selection control structures if, if else. Examine int and bool data types and logical (boolean) expressions. Explore how to form and evaluate logical (boolean) expressions. Learn how relational operators work with the string type. Learn how to use pseudocode to develop, test, and debug a program: objectives (cont"d. ) Discover how to use a switch statement in a program. Learn how to avoid bugs by avoiding partially understood concepts. Learn how to use the assert function to terminate a program. Execution of selection or repetition requires execution of a logical expression: Conditional statements: only executed if certain conditions are met. Condition: represented by a logical (boolean) expression that evaluates to a logical (boolean) value of true or false. Relational operators can be used with all three simple data types: Expressions such as 4 < 6 and "r" > "t". Returns an integer value of 1 if the logical expression evaluates to true.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents