What do we call the initial data that goes into an algorithm?
What is input?
What is the primary purpose of an if-statement in programming?
What is evaluate conditions and execute code when true or false?
What are two common kinds of loops?
What is for-loops and while-loops?
Is a While-loop a counter-based loop or a condition-based loop?
What is Condition?
What is a nested loop?
What are loops within loops?
What is the step-by-step method used to solve problems in computing called?
What is an algorithm?
How is a single-line if-statement structured?
What is the condition and instruction appearing on the same line?
What is each repetition of the block of instructions inside the for-loop called?
What is iteration?
When does the while loop end?
What is when the condition is False?
In nested loops, what are the outer and inner loops?
What is the outer loop controls the inner loop(s)?
What is the difference between pseudocode and a programming language?
What is pseudocode which is not meant for execution, while programming language is meant to be executed with syntax?
What in an if-else statement is executed if the condition is false?
What is Else?
What is the value of “sum” after the second iteration?
sum:= 0
For p= 4 to 10
sum: = sum + p
End-for
What is 9?
product:= 1
count:= 6
While (count>0)
product := product*count
count := count -2
End- while
What is the value of "product" after the second iteration?
What is 12?
Consider the following nested loops:
for i in range(3):
for j in range(2):
print(i, j)
How many times will the ‘print’ statement be executed in total?
What is 6 times?
If an algorithm has a Return statement in the middle, what happens?
What is algorithm stops executing at that point and outputs specified value?
What If the condition is true in an if-else statement, what happens to the "else" code?
What is Skipped?
How many iterations will the for-loop execute?
sum:= 0
For p= 4 to 10
sum: = sum + p
End-for
What is 7?
product:= 2
count:= 6
While (count>0)
product := product*count
count := count -2
End- while
What is the final value of "product" after the while-loop has completed all its iterations?
What is 24?
In a nested loop structure, what is the significance of the inner loop's execution regarding the outer loop?
What is the inner loop is executed for each iteration of the outer loop?
r:= u*2, s:= v+3, u:=z ÷ 2, t:= w-1, q:=s-t, v:=x+2, w:=y*2, p:=q+r^2, x:=z-1, z:=10, y:= z÷2
What is 105?
What is the value of x and y after the line of codes is run?
x = 10
y = 5
if(x< y):
Min = x
Max = y
Else:
Min = y
Max = x
End-if
What is min = 5 and Max = 10
What is the final value for the “sum” after executing the for-loop?
sum:= 0
For p= 4 to 10
sum: = sum + p
End-for
What is 49?
product:= 2
count:= 6
While (count>0)
product := product*count
count := count -2
End- while
How many iterations will the while-loop execute?
What is 3 or execute three iterations?
Given the following nested loop:
for i in range(2):
for j in range(3):
for k in range(4):
print(i, j, k)
How many times will the ‘print’ statement be executed in total?
What is 24 times?