Skip to main content
Contents
Search Book
close
Search Results:
No results.
Dark Mode Prev Up Next Scratch ActiveCode Profile
title here
\(\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.11 Evaluate Expressions-WE4-P1
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.11.1
For all given problems below indicate if the code is valid or invalid. Each problem is independent of the others (e.g. Question 2 does not depend on Question 1, only the βGivenβ code).
Subsection 1.11.2 Expressions-WE4-P1
alpha = 2
beta = 1
delta = 3
omega = 2.5
theta = -1.3
kappa = 3.0
gamma = '4'
zeta = '2.5'
Exercises Exercises
1.
Q28:
lambda = alpha / kappa + delta
2.
Q29:
eta = alpha * beta + (gamma - theta) * kappa
3.
Q30:
lambda = (gamma + zeta) * delta
4.
Q31:
epsilon = (gamma + zeta) * omega
You have attempted
of
activities on this page.