Algorithms & Programming Fundamentals
What is the value of y
after the following code is executed?
pseudocode
x ← 5
y ← x + 3
x ← 2
5
8
2
10
What is the result of the expression "hello" + " " + "world"
?
"helloworld"
"hello world"
"world hello"
Error
If x ← true
and y ← false
, what is the result of NOT y
?
true
false
Error
Null
Consider the following code:
pseudocode
x ← 5
y ← 10
IF x > 2
IF y < 15
DISPLAY("Both conditions met")
ELSE
DISPLAY("Only outer condition met")
ELSE
DISPLAY("No condition met")
What will be displayed?
Both conditions met
Only outer condition met
No condition met
Nothing
In the context of procedures, what are the values passed to a procedure when it is called?
Parameters
Arguments
Variables
Constants
What is the primary benefit of using procedural abstraction?
It makes the code more complex.
It allows modification of procedures without affecting the whole program.
It makes the code run slower.
It requires more code to be written.
What is a characteristic of an algorithm that runs in a reasonable amount of time?
Exponential efficiency
Factorial efficiency
Polynomial efficiency
Unreasonable efficiency

How are we doing?
Give us your feedback and let us know how we can improve
What is a characteristic of an undecidable problem?
It can always be solved by an algorithm
It cannot be solved by any algorithm
It may be solvable in some cases but not all
It is always easy to solve
How many times will the following loop execute?
pseudocode
REPEAT 8 TIMES
DISPLAY("Hello")
0
1
7
8
Which of the following is true about different algorithms that solve the same problem?
They always have the same efficiency.
They always produce the exact same side effects.
They can have different steps but achieve the same result.
They are always equally easy to understand.