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 will happen if you type pseudocode in another language's programming environment and try to run the program?
The program will not run, environments only understand actual languages
The program will run, because all environments understand pseudocode.
The program will run as long as you're using pseudocode for that language
2
After running that code, what does the coolDinos list store?
Torosaurus, Stegosaurus, Ankylosaurus, Ultrasauros, Supersaurus
Triceratops, Supersaurus, Ankylosaurus, Supersaurus, Therizinosaurus
Torosaurus, Stegosaurus, Ankylosaurus, Supersaurus, Therizinosaurus
Torosaurus, Triceratops, Stegosaurus, Ankylosaurus,Supersaurus, Ultrasauros
3
What is the output of this code?
1 0 4 3
1 0 1 3
1 0 3 3
1 0 3 4
4
Which of these lines of code displays the month ("03")?
DISPLAY (SUBSTRING (userBday, 0, 1))
DISPLAY (SUBSTRING (userBday, 1, 2))
DISPLAY (SUBSTRING (userBday, 1, 3))
DISPLAY (SUBSTRING (userBday, 1, 1))
5
When mouseX is 173 and mouseY is 271, what will be the value of currentSquare?
2
4
1
3
6
What is a benefit to using pseudocode?
Pseudocode represents coding concepts common to all programming languages.
Pseudocode runs much faster than other programming languages.
Pseudocode is understood by all computers everywhere.
Pseudocode can run in the web browser.
7
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
Programmers write organized programs using procedures for repetitive code
Computer programs run faster when they call code grouped into procedures
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
After the code runs, what is displayed?
: - D
D - :
D-:
:-D
10
What does the raceCars variable store after that code runs?
18, 2, 42, 10, 1, 4, 6, 3
18, 2, 42, 10, 1, 1, 6, 3
18, 2, 42, 10, 4, 6, 3
18, 2, 42, 10, 4, 1, 6, 3
11
Is the statement at the bottom True or False?
False
True
12
What value is stored in yardsSwam?
500
250
No value is stored
1000
13
After the code runs, what value is stored in result?
3
11
5
8
14
After running the code, what will be displayed?
12 12
11 11
12 11
11 12
15
In which situation will activity be "harvest"?
When month is "August" and tuberSize is 1.5
When month is "May" and tuberSize is 1.8
When month is "June" and tuberSize is 1.9
When month is "July" and tuberSize is 1.5
16
What can replace <MISSING CODE> so that this program will work as expected?
APPEND(quarterCosts, cost)
INSERT(quarterCosts, costs)
INSERT(costs, cost)
APPEND(costs, cost)
17
What does the program output?
BoatyMcBoatFace
McBoatFaceBoaty
Boaty (new line) McBoatFace
Boaty McBoatFace