wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSM with Visca

Total questions: 40

Worksheet time: 14mins

Name
Class
Date
1.

In a flowchart, a _ shape is used to represent a decision point that usually results in Yes/No or True/False outcomes.

(a)  

2.

To calculate the average of three numbers in a flowchart, you must first _ all three numbers before dividing by 3.

(a)  

3.

Which flowchart shape is correctly paired with its meaning? A. Rectangle → Input/Output B. Diamond → Decision C. Oval → Process D. Parallelogram → Start/End

a)

Rectangle → Input/Output

b)

Diamond → Decision

c)

Oval → Process

d)

Parallelogram → Start/End

4.

In the 'Determine Street Direction in NYC' example, if the street number is odd, the program should display "Westbound". What shape will be used for the display?

(a)  

5.

Why are flowcharts particularly helpful for non-programmers? A. They allow running programs without a computer. B. They represent processes visually with symbols and arrows. C. They are faster to execute than code. D. They eliminate the need for input data.

a)

They allow running programs without a computer.

b)

They represent processes visually with symbols and arrows.

c)

They are faster to execute than code.

d)

They eliminate the need for input data.

6.

When designing a flowchart for a login system with multiple attempts, which looping structure should be used? Briefly explain.

4 lines
7.

Which sequence correctly represents the steps for 'Add Two Numbers' in a flowchart? A. START → DISPLAY sum → INPUT numbers → END B. START → INPUT numbers → sum = num1 + num2 → DISPLAY sum → END C. INPUT numbers → START → DISPLAY sum → END D. START → sum = num1 + num2 → DISPLAY sum → END

a)

START → DISPLAY sum → INPUT numbers → END

b)

START → INPUT numbers → sum = num1 + num2 → DISPLAY sum → END

c)

INPUT numbers → START → DISPLAY sum → END

d)

START → sum = num1 + num2 → DISPLAY sum → END

8.

In flowcharts, a/an _ shows the direction of flow from one step to the next.

(a)  

9.

Which flowchart would you use to represent a program that reads two numbers and prints the largest? A. Linear flowchart with no decision B. Flowchart including a diamond decision symbol C. Flowchart using only rectangles D. Flowchart using only ovals

a)

Linear flowchart with no decision

b)

Flowchart including a diamond decision symbol

c)

Flowchart using only rectangles

d)

Flowchart using only ovals

10.

The main advantage of using flowcharts before coding is that they help _ the steps and logic of the program before implementation.

(a)  

11.

In a WHILE loop, the condition is checked _ the loop body executes.

(a)  

12.

Which scenario is best suited for a DO...WHILE loop? A. Processing an unknown number of data items only if data exists B. Asking the user for input at least once before validation C. Printing numbers from 1 to 100 D. Calculating the sum of a known set of numbers

a)

Processing an unknown number of data items only if data exists

b)

Asking the user for input at least once before validation

c)

Printing numbers from 1 to 100

d)

Calculating the sum of a known set of numbers

13.

A FOR loop is ideal when the _ of _ is known in advance.

4 lines
14.

Consider the following pseudocode: num = 6 DO PRINT num num = num + 1 WHILE num <= 5 What is printed? A. Nothing B. 6 C. 1 to 6 D. Infinite numbers

a)

Nothing

b)

6

c)

1 to 6

d)

Infinite numbers

15.

Using a loop reduces code duplication, improves maintainability, and prevents _ errors.

(a)  

16.

Which statement correctly contrasts WHILE and DO...WHILE loops? A. WHILE runs at least once; DO...WHILE may run zero times B. WHILE checks after execution; DO...WHILE checks before execution C. WHILE may not run if the condition is false; DO...WHILE always runs at least once D. WHILE is only for FOR loops; DO...WHILE is only for WHILE loops

a)

WHILE runs at least once; DO...WHILE may run zero times

b)

WHILE checks after execution; DO...WHILE checks before execution

c)

WHILE may not run if the condition is false; DO...WHILE always runs at least once

d)

WHILE is only for FOR loops; DO...WHILE is only for WHILE loops

17.

In a FOR loop, counter = start to end step increment defines the _, the number of iterations, and how the counter changes each time.

4 lines
18.

Which loop type is most suitable for printing the first 10 even numbers? A. FOR loop B. WHILE loop C. DO...WHILE loop D. Any of the above, depending on implementation

a)

FOR loop

b)

WHILE loop

c)

DO...WHILE loop

d)

Any of the above, depending on implementation

19.

A major best practice when using loops is to always ensure the loop has a _ to prevent infinite execution.

4 lines
20.

Which of the following pseudocode snippets is an infinite loop? A. num = 1 WHILE num <= 5 PRINT num num = num + 1 END WHILE B. DO INPUT x WHILE x != 0 C. FOR i = 1 TO 10 PRINT i ENDFOR D. WHILE TRUE PRINT 'Hello'

a)

num = 1 WHILE num <= 5 PRINT num num = num + 1 END WHILE

b)

DO INPUT x WHILE x != 0

c)

FOR i = 1 TO 10 PRINT i ENDFOR

d)

WHILE TRUE PRINT 'Hello'

21.

An algorithm must exhibit _ to ensure it completes in a finite number of steps.

(a)  

22.

Which pseudocode statement correctly assigns a value to a variable? A. INPUT x B. x = 5 C. PRINT x D. IF x > 5 THEN

a)

INPUT x

b)

x = 5

c)

PRINT x

d)

IF x > 5 THEN

23.

The attribute of algorithms that ensures each instruction is clear and precise is called _.

(a)  

24.

Which scenario violates the 'Generality' attribute of an algorithm? A. The algorithm stops after 5 steps B. The algorithm only works for numbers 1–5 C. The algorithm prints the result D. The algorithm uses a loop to sum numbers

a)

The algorithm stops after 5 steps

b)

The algorithm only works for numbers 1–5

c)

The algorithm prints the result

d)

The algorithm uses a loop to sum numbers

25.

For an algorithm to be effective, it should be basic, executable, and capable of producing a result in a _ number of steps.

(a)  

26.

In the 'Convert Celsius to Fahrenheit' pseudocode, which step represents Output? A. INPUT celsius B. fahrenheit = (celsius * 9/5) + 32 C. PRINT fahrenheit D. STOP

a)

INPUT celsius

b)

fahrenheit = (celsius * 9/5) + 32

c)

PRINT fahrenheit

d)

STOP

27.

When testing an algorithm manually to ensure definiteness, you check whether every step is _ and unambiguous.

(a)  

28.

Kwame wrote an algorithm that adds two numbers forever without stopping. Which attribute is missing? A. Finiteness B. Definiteness C. Generality D. Input/Output Capability

a)

Finiteness

b)

Definiteness

c)

Generality

d)

Input/Output Capability

29.

A pseudocode program that correctly reads a number, calculates its square, and prints it demonstrates proper use of _, _, and _ steps.

4 lines
30.

Which of the following is NOT a common pseudocode keyword for Input operations? A. READ B. GET C. INPUT D. PRINT

a)

READ

b)

GET

c)

INPUT

d)

PRINT

31.

Which of the following pseudocode snippets correctly demonstrates a conditional statement? A. IF x > 10 THEN PRINT 'Greater' B. WHILE x < 10 PRINT x C. FOR i = 1 TO 5 PRINT i ENDFOR D. DO PRINT x WHILE x < 10

a)

FOR i = 1 TO 5 PRINT i ENDFOR

b)

WHILE x < 10 PRINT x

c)

IF x > 10 THEN PRINT 'Greater'

d)

DO PRINT x WHILE x < 10

32.

What is the primary purpose of a flowchart in programming? A. To execute code directly B. To visualize the logic of an algorithm C. To store data D. To compile programs

a)

To visualize the logic of an algorithm

b)

To compile programs

c)

To store data

d)

To execute code directly

33.

In the context of algorithms, what does 'Definiteness' refer to? A. The algorithm must have a clear end B. Each step must be precisely defined C. The algorithm must be applicable to multiple problems D. The algorithm must produce an output

a)

The algorithm must have a clear end

b)

Each step must be precisely defined

c)

The algorithm must be applicable to multiple problems

d)

The algorithm must produce an output

34.

Which of the following correctly describes the 'Input' step in a flowchart? A. The process of displaying results B. The action of receiving data from the user C. The step where calculations are performed D. The final step of the algorithm

a)

The step where calculations are performed

b)

The action of receiving data from the user

c)

The final step of the algorithm

d)

The process of displaying results

35.

What is the main difference between a 'FOR' loop and a 'WHILE' loop? A. FOR loops are used for infinite iterations B. WHILE loops require a counter variable C. FOR loops are generally used when the number of iterations is known D. WHILE loops cannot be used for counting

a)

FOR loops are used for infinite iterations

b)

WHILE loops cannot be used for counting

c)

WHILE loops require a counter variable

d)

FOR loops are generally used when the number of iterations is known

36.

In a flowchart, which shape is used to represent a process? A. Diamond B. Rectangle C. Oval D. Parallelogram

a)

Oval

b)

Rectangle

c)

Parallelogram

d)

Diamond

37.

Which of the following pseudocode keywords is commonly used for output operations? A. DISPLAY B. OUTPUT C. PRINT D. SHOW

a)

SHOW

b)

PRINT

c)

OUTPUT

d)

DISPLAY

38.

In a flowchart, what does the diamond shape typically represent? A. Start/End B. Process C. Input/Output D. Decision

a)

Decision

b)

Input/Output

c)

Process

d)

Start/End

39.

What is the main characteristic of a 'FOR' loop compared to a 'WHILE' loop? A. FOR loops are used for indefinite iterations B. WHILE loops require a specific number of iterations C. FOR loops are typically used when the number of iterations is known D. WHILE loops are always faster

a)

FOR loops are used for indefinite iterations

b)

WHILE loops require a specific number of iterations

c)

WHILE loops are always faster

d)

FOR loops are typically used when the number of iterations is known

40.

How's preparations towards the CSM 184 exam going?
Be sincere 😋

4 lines