SJSU/Udacity CS046

Lesson 5.2 - Decisions

  1. Quiz: Comparing Decimals
  2. Quiz: Comparing Strings
  3. Quiz: What Does Null Mean?
  4. Quiz: Find the Error
  5. Quiz: And, Or, Not
  6. Quiz: Or
  7. Quiz: Both Threes
  8. Quiz: Exactly One Three
  9. Boolean
  10. Quiz: Using Booleans
  11. Quiz: Nested If
  12. Quiz: Elevator Demo with Input Validation
  13. Advice to Students

Quiz: Exactly One Three

Because && has higher precedence than ||, you can omit the parentheses:

if (x == 3 && y != 3 || x != 3 && y == 3) ... 

Problem on this page?

Your name:

Your email address:

Problem description:

To protect against spam robots, please answer this simple math problem:
× =