Skip to main content

Section 1.19 Evaluate Expressions-WE9-P1

Subgoals for evaluating an assignment statement.

  1. Decide order of operations
    1. Decompose as necessary
  2. Determine operator behavior based on operands
    1. Operator and operands must be compatible
  3. Solve arithmetic, expression, or operation
    1. Decompose as necessary

Subsection 1.19.1

For the assignment statements below, give the new value of the assigned variable. Each problem is independent of the others (e.g. Question 2 does not depend on Question 1, only the “Given” code).

Subsection 1.19.2 Expressions-WE9-P1

A truth tables shows all possible combinations of input values for a set of variables, and the corrsponding outputs.
The “Line #” column of the chart below corresponds to the following multiple choice questions. Complete this truth table by choosing “true” or “false” for each Line #.
Figure 1.19.1.

Exercises Exercises

1.
    Q60: Line #1
  • True
  • False
2.
    Q61: Line #2
  • True
  • False
3.
    Q62: Line #3
  • True
  • False
4.
    Q63: Line #4
  • True
  • False
5.
    Q64: Line #5
  • True
  • False
6.
    Q65: Line #6
  • True
  • False
7.
    Q66: Line #7
  • True
  • False
8.
    Q67: Line #8
  • True
  • False
You have attempted of activities on this page.