Skip to main content Contents
Prev Up Next Scratch ActiveCode Profile \(\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\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 1.3 Evaluate Expressions-WE1-P2
Subgoals for evaluating an assignment statement.
Decide order of operations
Determine operator behavior based on operands
Operator and operands must be compatible
Solve arithmetic, expression, or operation
Subsection 1.3.1
For the assignment statements below, either give the new value of the assigned variable, or enter “invalid” if the statement would result in an error. Each problem is independent of the others (e.g. Question 2 does not depend on Question 1, only the “Given” code).
Subsection 1.3.2 Evaluate Expressions-WE1-P2
Given
beta = 1
omega = 2.5
delta = '3.0'
Exercises Exercises
1.
2.
3.
4.
5.
Q10: theta = gamma
Why is this statement invalid?
Cannot assign a string to an integer variable
gamma does not have a value
theta does not have a value
Cannot assign an integer to a string variable
You have attempted
of
activities on this page.