Skip to main content\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 5.3 Assessment: Relational Expressions
Subgoals for Writing Selection Statements.
If Statement
Define how many mutually exclusive paths are needed
Order from most restrictive/selective group to least restrictive
Write if statement with Boolean expression
Follow with true bracket including action
Follow with else bracket
Repeat until all groups and actions are accounted for
OR Switch Statement
Determine variable / expression for mutually exclusive ranges
Write switch statement based on variable / expression
Each range is a ‘case’
Include break statements and default case if needed
Subsection 5.3.1 Write Relational Expressions
For each of the following, fill in the blank with the appropriate operator.
Exercises 5.3.2 Exercises
You have attempted
of
activities on this page.