Professional Documents
Culture Documents
Check Your Understanding - Attempt Review
Check Your Understanding - Attempt Review
Dashboard / Primer 2.0 - App Dev / Stage 1 / Software Fundamentals / Looping statements
Quiz review
Started on Saturday, 30 March 2024, 10:19 PM
State Finished
Completed on Saturday, 30 March 2024, 10:25 PM
Time taken 5 mins 55 secs
Marks 3.00/20.00
Grade 15.00 out of 100.00
Feedback Oops!! You have scored below 80%... So kindly make necessary preparations and reattempt...
Question 1
Correct
51101
Match the appropriate opening and closing blocks in looping statements.
BEGIN END
IF END IF
Question 2
Correct
Select one:
a. do-while loop
51101
b. For loop
c. While loop
Your answer is correct. (Do-while loop logic executes the statements at least once, and finally checks for the condition to be evaluated)
The correct answer is: do-while loop
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 1/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 3
Correct
BEGIN
FOR i<--1 to 5 do
factorial <--factorial * i
i <-- i+1
END FOR
PRINT factorial
END
Which of the following statement should be inserted to complete the above pseudo code for finding factorial of 5 numbers.
51101
Your answer is correct.
The logic for finding a factorial is factorial * index
BEGIN
51101
FOR i<--1 to 5 do
[ factorial <‑‑factorial * i ]
i <-- i+1
END FOR
PRINT factorial
END
Which of the following statement should be inserted to complete the above pseudo code for finding factorial of 5 numbers.
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 2/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 4
Incorrect
Which of the below given pseudo code snippet gives the above output?
Select one:
a.
BEGIN
PRINT even
PRINT even
END
b.
BEGIN
DECLARE number, count, even
WHILE number<count
PRINT even
PRINT even
END
c.
BEGIN
WHILE number<count
PRINT even
51101
SET even <-- even + 1
Number <-- number+ 1
END WHILE
PRINT even
END
d.
BEGIN
WHILE number<count
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 3/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
PRINT even
END WHILE
END
51101
PRINT even
END
51101
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 4/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 5
Incorrect
Select one:
a.
2
51101
2
b.
1
c.
1
d.
51101
2
Your answer is incorrect. The answer is 1, 2. Print statement is executed first, and prints count as 1. Count is incremented to 1 and the condition will be
checked. When it becomes false, the final count value 2 gets printed
51101
2
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 5/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 6
Incorrect
Your answer is incorrect. Looping block can have a single statement or block of statements
The correct answers are: single statement, Block of statements
Question 7
Incorrect
Select one:
a. if-else
b. Nested if
c. While loop
d. for loop
Question 8
Incorrect
Select one:
51101
a. In for loop, the exact number of iterations is known
b. For loop cannot be nested
c. For loop executes the statements at least once even if the condition is false
d. For loop executes the statement without checking the condition
Your answer is incorrect. In for loop, the exact number of iterations is known and it is entry controlled. For loop can be nested
The correct answer is: In for loop, the exact number of iterations is known
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 6/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 9
Incorrect
Jack wants to book flight tickets in Feather-Airways’ online portal for his family of five. Passenger details like name, age, gender etc.
should be entered for each member. The same process of getting details continues for all the five members. The above scenario is a
good example for which looping statements?
Select one:
a. While loop
b. Do-while loop
c. For loop
Your answer is incorrect. When the exact number of iterations is known, For loop can be used
The correct answer is: For loop
Question 10
Incorrect
51101
Mark 0.00 out of 1.00
BEGIN
DECLARE number
WHILE number>0
PRINT number
END
Select one:
a. -2
b. 2
c. 4
d. 0
51101
Your answer is incorrect.
The correct answer is: -2
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 7/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 11
Incorrect
FOR i <--1 to 15
PRINT i
i <-- i+3
END FOR
Select one:
a. 1 4 7 10 13
b. 4 7 10 13
c. 1 4 7 10 13 15 16
d. 4 7 10 13 16
51101
Your answer is incorrect. Value gets incremented by 3, until the number is less than 15
The correct answer is: 1 4 7 10 13
Question 12
Incorrect
Which of the following symbols is inappropriate in building the flowchart pertaining to sequential flow of program?
51101
Select one:
a. rectangle
b. oval
c. parallelogram
d. diamond
Your answer is incorrect. In a sequential Flow of a program, Decision making symbol is irrelevant
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 8/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 13
Incorrect
The statement / statements within the loop must get executed at least once except for do-while statement. State True/False.
Select one:
True
False
Your answer is incorrect. Looping statements except do-while are entry-controlled that is only if the condition is met it allows the block
to execute. Whereas do-while executes the statement at least once before checking the condition
The correct answer is 'False'.
Question 14
Incorrect
51101
Mark 0.00 out of 1.00
Which of the following statements are true with respect to looping statements?
51101
d. initial condition must be applied before the loop begins to execute
Your answer is incorrect. Initial condition must be applied before the loop begins to execute. The iteration must terminate at some point of time. A
looping statement can be nested and can have decision making statements
The correct answers are: initial condition must be applied before the loop begins to execute, the condition under which the iterative process should get
terminated must be given
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 9/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 15
Incorrect
b.
The operand in an expression must always be a variable.
c.
An operand is a mandatory element in an expression.
d.
The operand in an expression can be a variable or a constant.
Your answer is incorrect. The operand in an expression can be a variable or a constant. Operator without operand is meaningless
The correct answers are:
51101
An operand is a mandatory element in an expression.,
The operand in an expression can be a variable or a constant.
Question 16
Incorrect
Consider you have a Rubik cube with different colors in each face. To solve this cube, you will continue to rotate the sides until you reach
same colors in all faces. This is a real time example for which looping statements?
Select one:
a. Do-while
b. While
51101
c. Nested-if
d. For
Your answer is incorrect. In Rubik cube, you first check for the colours in all sides. If the colours are not the same, the cube is rotated until it attains same
colours in all faces
The correct answer is: While
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 10/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 17
Not answered
o d e p f g t r m i n l a h w
DOWN:
4) When you know the exact number of iterations, this loop is used
Across:
2
51101 [a]
[l] [o]
[f]
[o] [p] [i] [n] [g]
[g] [r]
[o]
3 [i] [t] [e] [r] [a] [t] [i] [o] [n]
[i]
[t]
5 [d] [o] [w] [h] [i] [l] [e]
[m]
51101
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 11/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 18
Incorrect
51101
Select one:
a. for loop
b. nested loop
c. Do-while loop
d. While loop
51101
Your answer is incorrect. While loop checks for the condition first. Only if it is true, it enters the block. The statements gets repeated until the condition
becomes false.
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 12/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
Question 19
Incorrect
It's Halloween. You go from house to house, tricking or treating. You get 2 candies from each house that you go to. You must return
home once you collect 100 candies. Can you arrange the sequence for this loop activity.
1 BEGIN
2 SET candy count <- 0
3 END WHILE
4 DECLARE candy_count
5 WHILE candy_count<=100
6 candy count <- candy_count+2
7 END
a. 1 4 2 5 6 3 7
51101
b.
1423657
c.
1243657
d. 1 4 5 2 3 6 7
51101
Question 20
Incorrect
a. Sequence logic
b. Iteration logic
c. Selection logic
51101
d. Program logic
Jump to...
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 13/14
3/30/24, 10:25 PM Check Your Understanding: Attempt review
51101
51101
51101
https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=1588905&cmid=4036 14/14