Question: What will the value of score be at the end of the program?
Answer: The score is: 4
Question: Explain in your own words the process of creating and updating a variable. How does the Counter Pattern with Event work?
Answer: When a variable is created it first needs to be named, in the code above the variable is named myVar. After the variable is created and named it will be assigned a value. Counter pattern with event works by assigning a value to the variable when an event is detected. In the code above the value of 1 is added to the myVar variable when the id is clicked.
Question: What will be displayed after this code segment is run?
Answer: 6
Question: The program below is run. Which of the following COULD NOT possibly be the output from that program?
Answer: 10 5 10 5
NO Check For Undersatnding on Code.org
Question: Can a computer evaluate an expression to something between true and false? Can you write an expression to deal with a "maybe" answer?
Answer: You would used a boolean expression to evaluate between true and false, and you can use and and or operators to deal with a maybe answer.
Question: When creating an if-else-if statement you should always make your first condition the most specific. Write a short paragraph responding to the questions below.
What does it mean to put the most specific case first?
Why is it important to put the most specific case first? What types of errors does it help avoid?
Answer: To put the most specific case first means to put the factor that should be affected first or the most into the statement at the beginning. This is important because the code will know what to focus on and later on it will affect what you want it to and not something completely different.
Question: What will be displayed after this code segment is run?
Answer: You Win!
Question: The program below asks a user to type in a number and then will output a message. What number will a user need to input for the message "COLD" to be displayed?
Answer: 5
No Check For Understanding on Code.org
Question: In your own words describe the benefits of creating functions in your code?
Answer: Functions make it easier to organize your code and it makes it so that you don't need to type as much, instead of writing the whole block of code when you want to repeat something you can just create a function and call it whenever you want the code in the function to be repeated.
Question: What will be displayed after this code segment is run?
Answer: School day
No Check For Understanding on Code.org
Question: End of Unit Survey
Answer: I understood almost all of the concepts we learned in this unit and I feel like I can be myself in this class.