Algorithm design and problem solving

4.0(1)
studied byStudied by 6 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/12

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards

What is abstraction in computational thinking?

Focusing on the essential details of a problem, ignoring irrelevant information.

2
New cards

Give an example of abstraction.

A road map highlights roads and important landmarks, omitting terrain details.

3
New cards

What are the benefits of using abstraction?

Faster program development, smaller program size requiring less memory, and efficient meeting of user requirements.

4
New cards

What is decomposition in computational thinking?

Breaking down a complex problem into smaller, manageable parts.

5
New cards

Provide an example of decomposition.

Designing a program to calculate salaries by gathering inputs, calculating salaries, and displaying results.

6
New cards

What is pattern recognition?

Identifying repeating patterns within a problem to simplify solutions.

7
New cards

How does an algorithm support problem-solving?

An algorithm is a sequence of steps designed to solve a problem.

8
New cards

What are the key forms of algorithms?

Structured English, Flowcharts, and Pseudocode.

9
New cards

Describe a simple structured English algorithm for calculating an average.

Ask for the number of values, loop to input values and add to total, and calculate the average.

10
New cards

What is stepwise refinement?

Breaking down a task into smaller, manageable parts repeatedly.

11
New cards

Explain the pseudocode example for calculating the area of a chosen shape.

Choose the shape, input dimensions, calculate area based on formula, and display the result.

12
New cards

Calculate the area using r = 10.

Area = 3.142 * 10^2 = 314.2.

13
New cards

List the steps in the stepwise refinement for calculating salaries.

Input employee details, calculate salary as HoursWorked * PayRate, and display the result.