Bird
Raised Fist0
Intro to Computingfundamentals~20 mins

Decomposition (breaking problems down) in Intro to Computing - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
πŸŽ–οΈ
Decomposition Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use decomposition in problem solving?

Imagine you want to bake a cake. Which of the following best explains why breaking the task into smaller steps helps?

ABecause smaller steps are easier to manage and check for mistakes.
BBecause doing everything at once is faster and less confusing.
CBecause breaking tasks makes the cake bake itself automatically.
DBecause smaller steps mean you don’t need ingredients.
Attempts:
2 left
πŸ’‘ Hint

Think about how you handle big tasks in daily life.

❓ trace
intermediate
2:00remaining
Trace the steps of decomposing a morning routine

Which of the following lists correctly breaks down the task 'Get ready for school' into smaller steps?

APack bag, brush teeth, wake up, eat breakfast, leave house.
BWake up, eat breakfast, leave house, brush teeth, pack bag.
CLeave house, pack bag, eat breakfast, brush teeth, wake up.
DWake up, brush teeth, eat breakfast, pack bag, leave house.
Attempts:
2 left
πŸ’‘ Hint

Think about the logical order you do things in the morning.

❓ identification
advanced
2:00remaining
Identify the best decomposition for a software task

You need to create a program that manages a library. Which decomposition breaks the problem into the most useful parts?

AWrite code, test code, debug code, deploy code, update code.
BAdd books, remove books, search books, lend books, return books.
CBuy books, read books, sell books, donate books, recycle books.
DOpen library, close library, clean library, paint library, decorate library.
Attempts:
2 left
πŸ’‘ Hint

Think about the main functions a library management program needs.

❓ Comparison
advanced
2:00remaining
Compare two decompositions of a task

Two students decomposed the task 'Plan a birthday party' differently. Which decomposition is better and why?

Student 1: Choose date, invite guests, buy cake, decorate room, play games.
Student 2: Buy cake, decorate room, invite guests, choose date, play games.

AStudent 1’s decomposition is better because it follows a logical order of planning.
BStudent 2’s decomposition is better because buying cake first saves time.
CBoth decompositions are equally good because they have the same steps.
DNeither decomposition is good because they don’t include cleaning after the party.
Attempts:
2 left
πŸ’‘ Hint

Think about what needs to happen before inviting guests.

πŸš€ Application
expert
3:00remaining
Apply decomposition to solve a complex problem

You want to build a simple calculator app. Which of the following decompositions breaks the problem into the most useful parts?

ADraw calculator, paint calculator, sell calculator, buy calculator, use calculator.
BWrite code, debug code, write code again, debug again, release app.
CDesign user interface, implement addition, implement subtraction, implement multiplication, implement division, test app.
DBuy a calculator, learn math, use calculator, fix calculator, throw calculator.
Attempts:
2 left
πŸ’‘ Hint

Think about the main features needed in a calculator app.

Practice

(1/5)
1. What is the main purpose of decomposition in problem solving?
easy
A. To combine many small problems into one big problem
B. To avoid solving the problem completely
C. To break a big problem into smaller, easier parts
D. To make the problem more confusing

Solution

  1. Step 1: Understand the meaning of decomposition

    Decomposition means breaking down a complex problem into smaller parts.
  2. Step 2: Identify the purpose of breaking down problems

    This helps make the problem easier to understand and solve step-by-step.
  3. Final Answer:

    To break a big problem into smaller, easier parts -> Option C
  4. Quick Check:

    Decomposition = breaking big problem into smaller parts [OK]
Hint: Think: big problem -> smaller pieces [OK]
Common Mistakes:
  • Confusing decomposition with combining problems
  • Thinking decomposition makes problems harder
  • Believing decomposition avoids solving problems
2. Which of the following is the correct way to start decomposing a problem?
easy
A. Identify smaller tasks that make up the problem
B. Ignore the problem and guess the answer
C. Write one big solution without parts
D. Combine unrelated problems into one

Solution

  1. Step 1: Understand how to begin decomposition

    Start by identifying smaller tasks or parts that together solve the big problem.
  2. Step 2: Recognize the wrong approaches

    Writing one big solution or ignoring the problem does not help break it down.
  3. Final Answer:

    Identify smaller tasks that make up the problem -> Option A
  4. Quick Check:

    Start decomposition by finding smaller tasks [OK]
Hint: Find smaller tasks first [OK]
Common Mistakes:
  • Trying to solve the whole problem at once
  • Ignoring the problem instead of breaking it down
  • Mixing unrelated problems
3. Look at this flowchart for making a sandwich:

Which step is an example of decomposition?
medium
A. Close sandwich
B. Eat sandwich
C. Add filling
D. Get bread

Solution

  1. Step 1: Understand decomposition in the flowchart

    Decomposition breaks a big task (make sandwich) into smaller steps like getting bread, adding filling.
  2. Step 2: Identify which step shows breaking down the task

    Getting bread is a smaller part of the whole sandwich-making process, so it is decomposition.
  3. Final Answer:

    Get bread -> Option D
  4. Quick Check:

    Decomposition = breaking task into smaller steps like 'Get bread' [OK]
Hint: Look for smaller steps in a big task [OK]
Common Mistakes:
  • Choosing the final step as decomposition
  • Confusing eating with breaking down tasks
  • Ignoring the flowchart steps
4. A student tries to decompose the task 'clean the house' but writes only 'clean everything at once'. What is wrong with this approach?
medium
A. They did not break the task into smaller parts
B. They broke the task into too many parts
C. They solved the problem correctly
D. They ignored the task completely

Solution

  1. Step 1: Analyze the student's approach

    The student wrote 'clean everything at once' which means no smaller parts were identified.
  2. Step 2: Understand the importance of breaking tasks down

    Decomposition requires dividing a big task into smaller, manageable parts, which was not done here.
  3. Final Answer:

    They did not break the task into smaller parts -> Option A
  4. Quick Check:

    Decomposition needs smaller parts, not one big task [OK]
Hint: Break big tasks into smaller parts [OK]
Common Mistakes:
  • Thinking doing everything at once is decomposition
  • Believing too many parts is wrong
  • Ignoring the task instead of breaking it down
5. You want to build a simple app that tracks daily water intake. Which is the best way to use decomposition to plan this app?
hard
A. Only focus on showing daily total without input or storage
B. Break the app into parts: input water amount, store data, show daily total
C. Ignore planning and start coding randomly
D. Write all code in one big block without parts

Solution

  1. Step 1: Understand the app's main functions

    The app needs to get input, save data, and display totals.
  2. Step 2: Apply decomposition to plan the app

    Breaking the app into these smaller parts helps organize and build it step-by-step.
  3. Final Answer:

    Break the app into parts: input water amount, store data, show daily total -> Option B
  4. Quick Check:

    Decompose app into input, storage, display parts [OK]
Hint: Split app into input, storage, display [OK]
Common Mistakes:
  • Trying to code everything at once
  • Skipping planning and decomposition
  • Ignoring important app parts
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard