Pseudocode is technically not one of these, since it has no compiler, no interpreter, and no universal rules. Different textbooks and exams write it differently.
What is a (real/actual) programming language?
While Java uses the equals sign for assignment, the TExES 241 pseudocode notation uses this distinctive symbol instead.
What is ← (the left arrow)?
This data type would be the most appropriate choice for storing a value of 3.1415926535 with high precision.
What is double?
Following the order of precedence, this is the value of: int result ← (4 + 2) * 3 ^ 2 MOD 7 - 1
What is 4? (3^2 = 9; 6 * 9 = 54; 54 MOD 7 = 5; 5 - 1 = 4)
Given String name ← "Pedro" and int score ← 15, this is the exact output of:
print "Hello, " + name + "! Your score is: " + score
What is "Hello, Pedro! Your score is: 15"?
Trace this code and give the final output:
int a ← 4
int b ← 2
int c ← a ^ b
int d ← c MOD 5
print d
What is 1? (4^2 = 16, then 16 MOD 5 = 1)
Given p = false and q = true, this is the value of: not p and not q
What is false? (not false = true; not true = false; true and false = false)
With int age ← 25, this is what the program prints:
if (age ≥ 18 and age ≤ 65)
print "Working-age group"
else
print "Not working-age"
end if
What is "Working-age group"?
With int score ← 72, trace this code and give the output (click the link below):
What is "C"?
With boolean isLoggedIn ← true and boolean hasPremiumAccess ← false, trace this nested conditional and give the output:
if (isLoggedIn == true)
if (hasPremiumAccess == true)
print "Welcome to Premium Dashboard"
else
print "Welcome to Basic Dashboard"
end if
else
print "Please log in first"
end if
What is "Welcome to Basic Dashboard"?
Trace and give the output:
for (int x ← 1; x < 5; x ← x + 1)
print x
end for
What is 1 2 3 4?
Trace and give the output:
int i ← 10
while (i > 0)
print i + " "
i ← i - 2
end while
What is "10 8 6 4 2"?
Trace this do while loop and give the output:
int x ← 10
do
print "Hi "
x ← x - 3
while (x > 0)
What is "Hi Hi Hi Hi"? (prints four times: x = 10, 7, 4, 1; stops when x = -2)
Trace this repeat until loop and give the output:
int x ← 2
repeat
print x + " "
x ← x * 2
until (x ≥ 100)
What is "2 4 8 16 32 64"?