bbb Home
Conditionals Contents        

DECISION MAKING WITH IF STATEMENTS

DECISIONS WITH IF...ELSE STATEMENTS

 


EXAMPLE

Font: 8pt   12pt   20pt   24pt   Width: Min. 50%   75%   100%   

PRACTICE

  1. Write a statement that determines if a number is positive, negative, or zero.
  2. Write a function called inOrder that accepts three values. The function should return true if the numbers are in order from lowest to highest and false if not.
  3. Write a function that accepts a number and returns true if the number is even and false if the number is odd.
  4. Create a page with a textbox, a button, two checkboxes, and two radio buttons. One checkbox should be labelled Italic and the other Bold. The radio buttons should represent two different fonts. When the user clicks the button, the contents of the textbox should be written to the page in the selected font and italicized or bold if checked.

SELF-QUIZ