

Algorithm and Problem Solving
Presentation
•
English
•
11th Grade
•
Practice Problem
•
Easy
Robert B.A
Used 6+ times
FREE Resource
37 Slides • 29 Questions
1
ALGORITHM DESIGN AND PROBLEM SOLVING
2
PROGRAM DEVELOPMENT LIFE CYCLE
The program development life cycle is divided into five stages:
1. Analysis
2. Design
3. Coding
4. Testing
5. Maintenance
3
Analysis
The first stage of the program development life cycle that involves investigating the problem.
This stage uses both decomposition and abstraction.
Decomposition breaks down a complex problem into smaller parts, which can then be subdivided into even smaller parts, that can be solved easily.
Abstraction keeps the key elements required for the solution to the problem and discards any unnecessary details and information that is not required.
4
Design
The program specification from the analysis stage is used to show to how the program should be developed.
This stage involves structure charts, flowcharts and pseudocode
5
Coding and iterative testing
The program or set of programs is developed. Each module of the program is written using a suitable programming language and then tested to see if it works.
Iterative testing means that modular tests are conducted, code amended, and tests repeated until the module performs as required.
6
Testing
The completed program or set of programs is run many times with different sets of test data. This ensures that all the tasks completed work together as specified in the program design.
7
Reorder
Reorder the following stages of software development
Analysis
Design
Coding
Testing
Maintenance
8
Match
Match the following
Analysis
Design
Coding
Testing
Decomposition and Abstraction
structure charts, flowcharts and pseudoc
Code Development
Running a code
Decomposition and Abstraction
structure charts, flowcharts and pseudoc
Code Development
Running a code
9
Multiple Choice
Which stage of the SDLC involves gathering and documenting requirements from stakeholders?
Analysis
Design
Coding
Testing
10
Multiple Choice
During which phase are algorithms implemented in a specific programming language?
Analysis
Design
Coding
Testing
11
Multiple Choice
Which of the following is NOT typically part of the Design phase?
Creating class diagrams
Defining the system architecture
Writing unit tests
Designing the user interface
12
Can you answer this?
There are two sons and 2 fathers in a car. Yet there are only 3 people. Explain how
13
There are 2 sons and 2 fathers in a car. Yet there are only 3 people. Explain how
Can you answer this?
14
Computer Systems, Sub-systems and decomposition
A computer system is made up of software, data, hardware, communications and people.
Each computer system can be divided up into a set of sub systems. each sub-systems can be further divided into sub-systems and so on until each sub-system just performs a single action.
15
Top-down design
Top-down design is the decomposition of a computer system into a set of sub systems, then breaking each sub-system down into a set of smaller sub-systems, until each sub-system just performs a single action.
The process of breaking down into smaller sub-systems is called stepwise refinement.
16
Decomposing a problem.
The parts of any computer system are
Inputs
Processes
Outputs
Storage
17
Example: An Alarm App
inputs – time to set the alarm, remove a previously set alarm time, switch an alarm off, press snooze button
processes – continuously check if the current time matches an alarm time that has been set, storage and removal of alarm times, management of snooze
outputs – continuous sound/tune (at alarm time or after snooze time expired)
storage – time(s) for alarms set.
18
Homework
Mention one computer system
identify Input, Processes, Outputs, Storage.
19
Match
Match the following
Inputs
Process
Output
Storage
Data to be entered
Task to be performed
Information to be displayed
data that needs to be stored
Data to be entered
Task to be performed
Information to be displayed
data that needs to be stored
20
Multiple Choice
Which of the following is NOT typically considered one of the main components of a computer system?
Hardware
Software
People
Electricity
21
Multiple Choice
What component of a computer system processes data and controls other parts of the system?
Memory
Operating System
Network Interface Card
CPU
22
Multiple Choice
What type of software is designed to perform specific tasks for users?
23
Multiple Choice
In a computer system, what does the term 'data' primarily refer to?
24
Methods used to design and construct a solution to a problem
25
Structure diagrams
Flowcharts
Pseudocode.
26
Structure diagrams
27
Structure diagrams can be used to show top-down design in a diagrammatic form.
The name of the program at the top, below its subprograms
Structure Diagrams
28
Structure diagram for alarm app
29
Structure diagram for a calculator
30
Pair Work
31
Flowcharts
32
A Flowchart
A digramatic representation of an algorithm.
33
Flowchart symbols
34
Begin/End: Terminator flowchart symbols are used at the beginning and end of each flowchart.
Start/Stop (Begin/End)
35
Process flowchart symbols are used to show actions, for example, when values are assigned to variables.
Process
36
The same flowchart symbol is used to show the input of data and output of information.
Input and output
37
Decision Decision flowchart symbols are used to decide which action is to be taken next; these can be used for selection and repetition/iteration.
There are always two outputs from a decision flowchart symbol.
Decision
38
Flowchart flow lines use arrows to show the direction of flow, which is usually, but not always, top to bottom and left to right.
Flow lines
39
Examples
Draw flowchart to find the average of two numbers.
Draw a flowchart to allow a user to input the username and password. If the password is correct display the message "Logged in Successfully", Otherwise allow user to re enter the details.
40
Homework
Tickets are sold for a concert at $20 each, if 10 tickets are bought then the discount is 10%, if 20 tickets are bought the discount is 20%. No more than 25 tickets can be bought in a single transaction. Draw a flowchart for this scenario.
Draw a flowchart that will accept three numbers from the user, and displays the greatest number among the three numbers.
41
Multiple Choice
In a program that calculates the area of a circle, what is considered the INPUT?
The formula πr²
The radius of the circle
The calculated area
The multiplication process
42
Multiple Choice
In a student grading program, what would be considered an OUTPUT?
The list of test scores entered
The calculation of the average
The final letter grade displayed to the user
The grading scale used
43
Multiple Choice
For an ATM withdrawal system, which combination correctly represents the Input-Process-Output sequence?
Account balance, withdrawal amount, receipt
PIN verification, money dispensing, new balance calculation
Card insertion/PIN/amount → Balance verification/transaction processing → Money dispensed/receipt/new balance
Money dispensed, account update, transaction record
44
Multiple Choice
In a password validation algorithm, what is NOT typically part of the INPUT?
he password entered by the user
The minimum password length requirement
The error message displayed
The required character types
45
Multiple Choice
What does a rectangle represent in a flowchart?
A decision
An input or output
A connector
A process
46
Multiple Choice
Which symbol is used to represent a decision in a flowchart?
47
Multiple Choice
What does an arrow indicate in a flowchart?
48
Multiple Choice
Which shape is used for the start and end of a flowchart?
49
Multiple Choice
In a flowchart, what does the process symbol represent?
Start/End
Decision
Data Input/Output
Sequential steps or actions
50
Multiple Choice
What is the output when "a" is 10
10
9
11
51
Multiple Choice
What will the program print when the value of a is 10
10
11
9
52
Multiple Choice
What will the program print when the value of "a" is 9
9
10
8
53
Multiple Choice
What is the output when A is 9 and B is 14
B is greater
A is greater
No output
54
Multiple Choice
What will be the output when "a" is 15
a is odd
a is even
16
55
Pseudocode
56
Pseudocode
Pseudocode is a simple method of showing an algorithm. It describes what the algorithm does by using English key words that are very similar to those used in a high-level programming language.
57
Principles
All keywords (words used to describe a specific action e.g. INPUT) are written in capital letters.
Where conditional and loop statements are used, repeated or selected statements are indented by two spaces.
58
Assignment statement
A value is assigned to an item/variable using the <--- operator
Examples
score <--- 90 score has the value of 90
age <--- 15 age has the value of 15
name <--- "Alice" name has the value of Alice
IsMarried <--- FALSE IsMarried has the value of FALSE
59
Fill in the Blanks
60
Fill in the Blanks
61
Fill in the Blanks
62
Fill in the Blanks
63
Fill in the Blanks
Type answer...
64
The pseudocode for conditional statements
When different actions are performed by an algorithm according to the values of the variables, conditional statements can be used to decide which action should be taken.
There are two types of conditional statement:
a condition that can be true or false
a choice between several different values
65
IF … THEN … ELSE … ENDIF
For an IF condition the THEN path is followed if the condition is true and the ELSE path is followed if the condition is false.
IF Age < 18
THEN
OUTPUT "Child"
ELSE
OUTPUT "Adult"
ENDIF
66
Discussion questions
Write a pseudocode for the following scenarios
Determine if the number is even or odd
Check if the grade is pass of fail (pass score>50)
Check if the number is negative or positive
Checking whether its a weekend or not.
ALGORITHM DESIGN AND PROBLEM SOLVING
Show answer
Auto Play
Slide 1 / 66
SLIDE
Similar Resources on Wayground
60 questions
Ôn tập tin 6
Presentation
•
KG
60 questions
The Giver novel review (1-10)
Presentation
•
11th Grade
62 questions
Interpreting and Discussing Visual Art
Presentation
•
11th Grade
58 questions
Collective Nouns
Presentation
•
11th Grade
61 questions
SSUSH9: Civil War
Presentation
•
11th Grade
65 questions
HORTATORY LANGUANGE FEATURE
Presentation
•
11th Grade
62 questions
BMIIIBC RL.10.1, 2, 3, 4, 5, The Raven
Presentation
•
10th Grade
60 questions
Cells and Cell Processes
Presentation
•
10th - 12th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade
Discover more resources for English
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
10 questions
Fire Prevention
Quiz
•
9th - 12th Grade
20 questions
Grammar
Quiz
•
9th - 12th Grade
10 questions
Credible Sources
Presentation
•
8th - 12th Grade
20 questions
Text Structures
Quiz
•
9th - 12th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
20 questions
English 2 STAAR Grammar Review
Quiz
•
9th - 11th Grade
24 questions
English I/II STAAR Review
Presentation
•
9th - 12th Grade