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