stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
CS2 Programming Quiz 1 Flashcards | StudBud
Explore
/
CS2 Programming Quiz 1
CS2 Programming Quiz 1
20 terms
·
StudBud Administration
·
13 plays
Imported from external platform
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
Programming languages come with ___ that we use to create mathematical expressions.
Math Signals
Arithmetic Operators
Javascript Language
Expressions
2
What does the program output?
Boaty McBoatFace
McBoatFaceBoaty
BoatyMcBoatFace
Boaty Mc Boat Face
3
aptUnit ← "11"
Number
String
4
The Math.PI variable is a
constant
, which means it can't be re-assigned.
False
True
5
With the basic arithmetic operations (+, -, *, /), we can write programs to compute anything a simple calculator can.
True
False
6
What is a benefit to using pseudocode?
Pseudocode can represent coding concepts common to all programming language
Pseudocode is understood by all computers everywhere
Pseudocode can run in the web browser
Pseudocode runs much faster than other programming languages
7
streetNo ← 728
String
Number
8
Oakley is making a program to display events for the next few days.
After running that code, what will be displayed?
11 11
12 11
11 12
12 12
9
Math.pow(base, exp)
Returns the maximum of the given numbers.
Returns the largest integer less than or equal to num.
Returns base to the power of exp.
Returns the minimum of the given numbers.
10
How many string variables is this code storing?
2
1
5
3
11
How many statements are in the above program?
2
4
3
1
12
Evelyn is making a race car simulation program. She accidentally gave two of her variables the same name:
0
60
0 60
60 0
13
Nyala is making a program to display a monster on the screen. What will the value of x be when the code runs?
82
55
0
137
14
areaCode ← 315
String
Number
15
After the code runs, what is displayed?
D-:
: - D
D - :
: - D
16
Which of these variables are storing a string data type?
latitude ← 34.0639
searchQuery ← "90210"
longitude ← 118.2008
temp ← 63
17
What is the pseudocode equivalent of this JavaScript? var hair = "curly";
hair ← curly
hair = "curly"
hair ← "curly"
hair = curly
18
In programming lingo, we call each letter a
string
.
True
False
19
phone ← "341-7812"
String
Number
20
Kobe is working on a basketball game and is experimenting with variables he'll use. The output will be:
1 0 4 3
1 0 1 3
1 0 3 1
1 0 3 3