wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Problem Solving and Program Design

Total questions: 20

Worksheet time: 15mins

Name
Class
Date
1.

What is the first step in the problem-solving process?

a)

Propose solutions

b)

Define the problem

c)

Test and validate the solution

d)

Develop the algorithm

2.

Which of the following is NOT part of the divide-and-conquer approach?

a)

Breaking a large problem into smaller tasks

b)

Solving each smaller task individually

c)

Defining the problem in one large statement

d)

Managing tasks in a structured manner

3.

What does IPO stand for in problem-solving?

a)

Input, Process, Output

b)

Input, Performance, Output

c)

Indicate, Process, Operate

d)

Input, Produce, Output

4.

Which of the following is a valid variable name in most programming languages?

a)

1stPlace

b)

total_Score

c)

#score

d)

break

5.

What is a constant in programming?

a)

A value that can change during the program

b)

A value that cannot be changed once defined

c)

A function that runs repeatedly

d)

A statement that ends the program

6.

Which of these is a valid example of a constant?

a)

studentName

b)

totalAmount

c)

pi = 3.14159

d)

score = 0

7.

What is the purpose of testing and validating a solution?

a)

To add new features to the solution

b)

To check if the solution works as intended

c)

To break the solution into smaller tasks

d)

To update the problem definition

8.

In which of the following situations should you use the divide-and-conquer approach?

a)

When you have a simple problem that can be solved in one step

b)

When you need to manage complex problems that involve multiple tasks

c)

When you are writing a short program

d)

When you have already defined the problem

9.

Which data type is used to store true or false values?

a)

Integer

b)

String

c)

Boolean

d)

Character

10.

Which of the following is a valid algorithm step?

a)

Create an ambiguous process

b)

Have an infinite number of steps

c)

Use imprecise instructions

d)

Perform a clear and finite set of steps

11.

What is the output of this problem-solving example: "You need to calculate the total cost for a school trip, which involves 50 students, $20 per student, and $100 extra for transportation."?

a)

$1,000

b)

$1,100

c)

$100

d)

$1,500

12.

Which of these variable names is invalid in most programming languages?

a)

firstName

b)

totalAmount

c)

123number

d)

age

13.

What is the correct order for steps in a problem-solving algorithm?

a)

Define the problem → Develop the algorithm → Test the solution

b)

Define the problem → Propose solutions → Develop the algorithm → Test the solution → Validate the solution

c)

Propose solutions → Develop the algorithm → Define the problem

d)

Test the solution → Develop the algorithm → Define the problem

14.

Which of the following is an example of a variable?

a)

pi

b)

age = 20

c)

3.14

d)

1studentName = "John"

15.

Which rule applies to naming variables in most programming languages?

a)

Variable names must begin with a number

b)

Special characters are allowed in variable names

c)

Variable names should be descriptive

d)

Variable names cannot contain underscores

16.

What is the purpose of an IPO chart?

a)

To define the algorithm in detail

b)

To break down a problem into its input, process, and output components

c)

To list all possible solutions

d)

To define the output of an algorithm

17.

What is the primary benefit of dividing a large problem into smaller tasks?

a)

It increases the complexity of the problem

b)

It makes the problem easier to manage and solve

c)

It eliminates the need to define the problem

d)

It makes the solution less efficient

18.

Which of the following is a characteristic of a good algorithm?

a)

Infinite steps

b)

Ambiguity in instructions

c)

A finite number of steps

d)

Irrelevant steps

19.

In which situation would you use a string data type?

a)

To store a user's age

b)

To store a series of characters (e.g., a name or sentence)

c)

To store a series of numbers

d)

To store a true/false value

20.

Which of the following is the best approach to solving a large problem?

a)

Ignore the problem and hope it resolves itself

b)

Divide the problem into smaller, more manageable tasks

c)

Solve all tasks at once without breaking them down

d)

Reevaluate the problem until a solution emerges