What will print in the debug console?

Variables/Conditionals/Functions

Flashcard
•
Computers
•
9th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

12 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
10
Answer explanation
The answer is C since that is the latest time that the variable “plop” is called.
2.
FLASHCARD QUESTION
Front
What will print in the debug console?
Back
75
Answer explanation
The answer is C since we add each call of the variable together with the number for each line.
3.
FLASHCARD QUESTION
Front
What will print in the debug console?
Back
50
Answer explanation
The answer is D since koala = 35 and bear = 5, koala adds 10 = 45. So, when we combine koala and bear we get 50 as our output.
4.
FLASHCARD QUESTION
Front
What is the correct output? Options: Less than 10, Less than 20, Less than 20, Less than 30, 40 or more
Back
40 or more
Answer explanation
The answer is E since each time the score is called it adds onto the previous call of the variable.
5.
FLASHCARD QUESTION
Front
What is the correct output? Options: Output C, Output E, Output D, Output A
Back
Output D
Answer explanation
The answer is output D because it is the one conditional that is true due to the || (or) in the if-else-ifs.
6.
FLASHCARD QUESTION
Front
What is the correct output? Options: Hi You’ve got this!, Hi Hi You’ve You’ve got this! got this!, Hi You’ve got this! You’ve got this!, Hi You’ve got this! Hi You’ve got this!
Back
Hi You’ve got this! You’ve got this!
Answer explanation
The answer is C because line 1 will print Hi, then the function is called twice, so there will be two lines of You’ve got and two lines of this! printed one part on one line and the other on the following line.
7.
FLASHCARD QUESTION
Front
You rock! cannot display. How can we change this in the event handler to make it display correctly? Options: Line 1 change the global variable to total grade, Line 3 take out var and remove the local variable, Line 4 change grade to == 90, Line 5 change to getText command
Back
Line 3 take out var and remove the local variable
Answer explanation
The answer is B because we don’t want local variables since they will only focus on one event handler and not the entire program. Set the variables first so that they remain global instead. This way when you call the variable into an event handler, you do not use the var version of it.
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Microbit Algorithms

Flashcard
•
9th Grade
7 questions
Types of Sentences

Flashcard
•
9th - 10th Grade
12 questions
Basics Python

Flashcard
•
8th - 10th Grade
10 questions
CSP I: Unit 4 – Lessons 5-8 (Conditionals)

Flashcard
•
9th Grade
11 questions
CMU CS Academy Unit 3.2.1 Boolean Expressions

Flashcard
•
9th Grade
8 questions
Python

Flashcard
•
KG - 9th Grade
14 questions
CMU CS Academy Unit 3.2.1 Boolean Expressions Part 0

Flashcard
•
9th Grade
15 questions
Python logical operators

Flashcard
•
9th Grade
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
Discover more resources for Computers
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
14 questions
Attributes of Linear Functions

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
50 questions
Biology Regents Review 2: Ecology

Quiz
•
9th - 12th Grade