This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz - Checking Your Balance (3-5) | |
| */ | |
| // change the values of `balance`, `checkBalance`, and `isActive` to test your code | |
| var balance = -100.00; | |
| var checkBalance = true; | |
| var isActive = true; | |
| // your code goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: What do I Wear? (3-7) | |
| */ | |
| // change the values of `shirtWidth`, `shirtLength`, and `shirtSleeve` to test your code | |
| var shirtWidth = 19; | |
| var shirtLength = 28.5; | |
| var shirtSleeve = 8.2; | |
| // your code goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Ice Cream (3-6) | |
| * | |
| * Write a single if statement that logs out the message: | |
| * | |
| * "I'd like two scoops of __________ ice cream in a __________ with __________." | |
| * | |
| * ...only if: | |
| * - flavor is "vanilla" or "chocolate" | |
| * - vessel is "cone" or "bowl" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz - Navigating the Food Chain (3-8) | |
| * | |
| * Use a series of ternary operator to set the category to one of the following: | |
| * - "herbivore" if an animal eats plants | |
| * - "carnivore" if an animal eats animals | |
| * - "omnivore" if an animal eats plants and animals | |
| * - undefined if an animal doesn't eat plants or animals | |
| * | |
| * Notes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Back to School (3-9) | |
| */ | |
| // change the value of `education` to test your code | |
| var education = "a Doctoral degree"; | |
| // set the value of this based on a person's education | |
| var salary = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: JuliaJames (4-1) | |
| */ | |
| // check divisibility | |
| // print Julia, James, or JuliaJames | |
| // increment x | |
| var x = 1; | |
| while (x <= 20 /* your stop condition goes here */) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Even or Odd (3-2) | |
| * | |
| * Write an if...else statement that prints `even` if the | |
| * number is even and prints `odd` if the number is odd. | |
| * | |
| * Note - make sure to print only the string "even" or the string "odd" | |
| */ | |
| // change the value of `number` to test your if...else statement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Musical Groups (3-3) | |
| */ | |
| // change the value of `musicians` to test your conditional statements | |
| var musicians = 6; | |
| // your code goes here | |
| if (musicians > 4) { | |
| console.log("this is a large group"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: Murder Mystery (3-4) | |
| */ | |
| // change the value of `room` and `suspect` to test your code | |
| var room = "ballroom"; | |
| var suspect = "Mr. Kalehoff"; | |
| var weapon = ""; | |
| var solved = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Programming Quiz: 99 Bottles of Juice (4-2) | |
| * | |
| * Use the following `while` loop to write out the song "99 bottles of juice". | |
| * Log the your lyrics to the console. | |
| * | |
| * Note | |
| * - Each line of the lyrics needs to be logged to the same line. | |
| * - The pluralization of the word "bottle" changes from "2 bottles" to "1 bottle" to "0 bottles". | |
| */ |
OlderNewer