Answer Key

Answers

  1. An application that takes in two numbers, subtracts them, and prints the difference (no peeking at the one above)

    1. Input
    2. double variable
    3. - operator
    4. Output
  2. An application that takes in two numbers and divides the first by the second if the first is less than the second. Otherwise it multiplies the two. Print the result.

    1. Input
    2. double variable
    3. conditionals
    4. / operator OR * operator
    5. Output
  3. An application that takes in 2 numbers and a character. The character will be "+", "-", "*", or "/". Using the tools above, create a calculator that prints out the sum, difference, product, or quotient of the numbers.

    1. Input
    2. double variable
    3. String variable
    4. conditionals
    5. +, -, *, or / operators
    6. Output
  4. An application that prints the sum of an array of numbers.

    1. Array
    2. double variable
    3. loops
    4. Output
  5. A tic tac toe game in which the user clicks to add an O or X (depending on whose turn it is). After each turn, if there are three of a kind in a row, the winner (X or O) is printed and the game ends.

    1. String variable
    2. loops
    3. Input
    4. conditionals
    5. Output