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