Answer Key
Answers
-
An application that takes in two numbers, subtracts them, and prints the difference (no peeking at the one above)
Inputdoublevariable-operatorOutput
-
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.
Inputdoublevariableconditionals/operator OR*operatorOutput
-
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.InputdoublevariableStringvariableconditionals+,-,*, or/operatorsOutput
-
An application that prints the sum of an array of numbers.
ArraydoublevariableloopsOutput
-
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.
StringvariableloopsInputconditionalsOutput