stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
APCSP-Programming Flashcards | StudBud
Explore
/
APCSP-Programming
APCSP-Programming
17 terms
·
StudBud Administration
Quiz on Programming Concepts (Photo by Florian Olivo on unsplash.com)
Flashcards
17 cards
F
Practice quiz
P
Host live
L
Questions
17
Answers
1
What is the output of this code?
1 0 1 3
1 0 3 3
1 0 4 3
1 0 3 4
2
Which of the following is a benefit of procedures in programming?
Computer programs are more secure because the procedures hide code
Programmers can be more certain their code has no bugs if in a procedure
Computer programs run faster when they call code grouped into procedures
Programmers write organized programs using procedures for repetitive code
3
After running that code, what does the coolDinos list store?
Triceratops, Supersaurus, Ankylosaurus, Supersaurus, Therizinosaurus
Torosaurus, Stegosaurus, Ankylosaurus, Supersaurus, Therizinosaurus
Torosaurus, Stegosaurus, Ankylosaurus, Ultrasauros, Supersaurus
Torosaurus, Triceratops, Stegosaurus, Ankylosaurus,Supersaurus, Ultrasauros
4
Is the statement at the bottom True or False?
True
False
5
After the code runs, what value is stored in result?
8
5
11
3
6
What does the raceCars variable store after that code runs?
18, 2, 42, 10, 4, 1, 6, 3
18, 2, 42, 10, 4, 6, 3
18, 2, 42, 10, 1, 1, 6, 3
18, 2, 42, 10, 1, 4, 6, 3
7
What does the program output?
Boaty McBoatFace
Boaty (new line) McBoatFace
McBoatFaceBoaty
BoatyMcBoatFace
8
What is a benefit to using pseudocode?
Pseudocode can run in the web browser.
Pseudocode represents coding concepts common to all programming languages.
Pseudocode runs much faster than other programming languages.
Pseudocode is understood by all computers everywhere.
9
If we set x to 8 and y to 24, what value will the mystery variable store after running this code?
24
3
8
16
10
What value is stored in yardsSwam?
500
No value is stored
1000
250
11
In which situation will activity be "harvest"?
When month is "July" and tuberSize is 1.5
When month is "May" and tuberSize is 1.8
When month is "August" and tuberSize is 1.5
When month is "June" and tuberSize is 1.9
12
After running the code, what will be displayed?
12 11
11 12
12 12
11 11
13
When mouseX is 173 and mouseY is 271, what will be the value of currentSquare?
4
1
2
3
14
What can replace <MISSING CODE> so that this program will work as expected?
INSERT(costs, cost)
APPEND(costs, cost)
INSERT(quarterCosts, costs)
APPEND(quarterCosts, cost)
15
Which of these lines of code displays the month ("03")?
DISPLAY (SUBSTRING (userBday, 1, 1))
DISPLAY (SUBSTRING (userBday, 0, 1))
DISPLAY (SUBSTRING (userBday, 1, 2))
DISPLAY (SUBSTRING (userBday, 1, 3))
16
What will happen if you type pseudocode in another language's programming environment and try to run the program?
The program will run as long as you're using pseudocode for that language
The program will run, because all environments understand pseudocode.
The program will not run, environments only understand actual languages
17
After the code runs, what is displayed?
: - D
:-D
D-:
D - :