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