stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Programming Quiz - Unit 3 Code.org Flashcards | StudBud
Explore
/
Programming Quiz - Unit 3 Code.org
Programming Quiz - Unit 3 Code.org
14 terms
·
StudBud Administration
·
12 plays
A quiz on some of the programming concepts looked at in code.org's CSP unit 3.
Flashcards
14 cards
F
Practice quiz
P
Host live
L
Questions
14
Answers
1
Event-driven programming
A) Produces software for concerts and festivals
C) Reacts to events generated by the program and system
B) Reacts to events generated by the user
B and C
2
The term debugging comes from
Thomas Edison in 1878 & early electronic engineering
Who knows
The RAF testing aeroplane engines in WWII
Admiral Grace Hopper working in the 1940s
3
The code in the image is used to pass/fail students. What value of testScore is problematic?
0
-1
100
50
4
GUI stands for
Graphics usual interface
Great user interface
Graphical user interface
Graphics user interaction
5
Loops are used to repeat a code chunk many times. Conditional statements are used to:
Run only when the user triggers the correct event
Test if the code is working properly
Run different code depending on the program state
Make code run more smoothly
6
An event handler takes three arguments: the UI element id, the event type and a function called
the callback
the handler function
a pure function
the event function
7
You can debug a program by
Adding breakpoints in the development environment
Running the code with test data to check its behaviour
Adding console.log statements to see the values of variables
All of the above
8
What is the output of the loop?
0, 1, 2, 3, 4
1, 2, 6, 24, 120
5, 20, 60, 120, 120
5, 20, 60, 120
9
How many times does the loop run?
6
0
5
4
10
The code that makes this work is:
z = x; y = z; x = y;
z = x; x = y; y = x;
x = y; y = x;
z = x; x = y; y = z;
11
What will happen when the button is pressed?
Only the first event handler will run
Only the last event handler will run
The program won't run due to the conflict in event handlers
Both event handlers will run in sequence
12
Will the body of the if block be run?
No
Yes
Maybe
Depends
13
When the main loop in a GUI receives an event:
An event manager is fired
The event is passed to the javascript interpreter
The event is displayed to the user
An event handler is fired
14
What is the binary number 1101 in decimal
13
1101
-5
42