Algorithms & Programming Fundamentals
What is the value of the variable 'x' after the following pseudocode is executed?
x โ 10
0
10
Error
Null
What is the value of y
after the following code is executed?
x โ 5
y โ x + 3
x โ 2
5
8
2
10
Given the list myList โ [5, 10, 15, 20]
, what value does myList[1]
represent?
5
10
15
20
What is the content of numbers
after executing the following pseudocode?
numbers โ [1, 2, 3]
INSERT(numbers, 2, 4)
[1, 2, 3, 4]
[1, 4, 2, 3]
[1, 2, 4, 3]
[4, 1, 2, 3]
What is the result of the expression 15 MOD 4
?
1
2
3
4
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

How are we doing?
Give us your feedback and let us know how we can improve
What is printed after the following code is executed?
x โ 7
IF x > 10
DISPLAY("Large")
ELSE
DISPLAY("Small")
Large
Small
Both Large and Small
Nothing
Consider the following code:
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
How many times will the following loop execute?
REPEAT 8 TIMES
DISPLAY("Hello")
0
1
7
8