Recitation on Selection
Purpose: Practice selection
statements, including if-else statements and switch statements. In
parts 1-3 users will enter input through a dialog window. Part 4 users
have an HTML form interface. You will also practice testing that your
program works properly. For each exercise, try to think of input values
that will cause every possible outcome. Verify that the input creates
the expected outcome.
Post
your questions and answers here
Notes
Parts
Answers (after recitation)
- Part 1: Simple if statement
- Part 2: if statement and swtich statement
- Part 3: Ranges
- Part 4: Vending machine restaurant