0% found this document useful (0 votes)
11 views20 pages

Arning Stations - Problem Solving Analysis (Anthony & Chance)

Some key benefits of flowcharting and pseudocode that were highlighted: Flowcharting: - Acts as a visual blueprint of the program logic/flow - Allows debugging by analyzing program flow - Helps ensure the program logic makes sense Pseudocode: - Can be easily converted to actual code - Helps think through the logic/algorithm before coding - Provides a plan/outline before starting to code Both approaches help work through the logic and problem-solving aspect before coding, which can reduce errors and help ensure the program is well designed. The visual nature of flowcharts also aids in understanding complex program flows.

Uploaded by

Chance Deng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views20 pages

Arning Stations - Problem Solving Analysis (Anthony & Chance)

Some key benefits of flowcharting and pseudocode that were highlighted: Flowcharting: - Acts as a visual blueprint of the program logic/flow - Allows debugging by analyzing program flow - Helps ensure the program logic makes sense Pseudocode: - Can be easily converted to actual code - Helps think through the logic/algorithm before coding - Provides a plan/outline before starting to code Both approaches help work through the logic and problem-solving aspect before coding, which can reduce errors and help ensure the program is well designed. The visual nature of flowcharts also aids in understanding complex program flows.

Uploaded by

Chance Deng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

To complete each station,

please assign one person

Learning
to share their slide deck
with the other members
in the group GROUP
portions of the stations

Stations
Program Analysis and
Design

START!
Before we begin

Choose a colour and


Start by creating a section type your name
in your beside it
Learning Blog called Anthony
“Program Analysis and
Design” Chance

<Group member
3>
Table of Contents

Station 1
IPO Station

Station 2
Algorithm Station

Station 3
Flowcharting Station
Station 1: IPO Station Table of
Contents

AS A GROUP, using the whiteboard and markers draw an IPO table


Station 1
as follows

Station 2

Station 3

Fill out the IPO table to break down the following problems:
1. Program to subtract 2 numbers
2. Program calculates the area of a circle
3. Program converts miles to kilometers
4. Program to calculate a person’s age and tell them what generation (/……….)
they are
5. Program to calculate a person’s BMI and tell them if they are underweight,
normal weight, overweight, obese
Station 2: Algorithm Station Table of C
ontents

AS A GROUP, Station 1

● run algorithms #1, #2, and #3 using the given input values.
Station 2
● Use the to keep track of where your group is in the
algorithm. Station 3
● As you go through each line of the algorithm, fill out the
Trace Table by dragging and dropping the numbers into
their appropriate spots in the Trace Table
● Each group member is responsible for dragging and
dropping their own colours. E.g.
● Finally, type what would output on the screen
Start the Station
Station 2 - Algorithm #1 - Trace Table (use the BLUE pieces)

counter number total


Station 2 - Algorithm #1
Note: Use the red arrow to help keep track of where your
group is in the pseudo-code/algorithm

Input values: 23, 12, 6

Pseudo-Code/Algorithm:
initialize counter to 0
initialize number to 0
initialize total to 0
while counter is less than 3
Increase counter by 1
Get next input value
Set number to input value
Add the number to the total
End while loop
Print “the total is”, total
Station 2 - Algorithm #2 - Trace Table (use the RED pieces)
counter grade total average

5
7
Station 2 - Algorithm #2
Note: Use the red arrow to help keep track of where your group is in the pseudo-code/algorithm

Input values: 50, 70, 50, 35, 80


Pseudo-Code/Algorithm:
initialize counter to 0
initialize grade to 0
initialize total to 0
initialize average to 0
while counter is less than 5
Increase counter by 1
Get next input value
Set grade to input value
Add the grade into the total
End while loop
Set the class average to the total divided by counter
Print “the class average is”, average
Station 2 - Algorithm #3 - Trace Table (use the GREEN pieces)

counter mark passes failures


Station 2 - Algorithm #3
Note: Use the red arrow to help keep track of where your group is in the pseudo-code/algorithm
Input values: 10, 49, 70, 50, 35, 80
Pseudo-Code/Algorithm:
initialize counter to 0
initialize mark to 0
initialize passes to 0
initialize failures to 0
while counter <= 6
Increase counter by 1
Get next input value
Set mark to input value
if the mark > 49 then
add one to passes
Else
add one to failures
End if
End while loop
print “the number of passes”, passes
print “the number of failures”, failures
Station 3: Flowcharting Station Table of C
ontents

AS A GROUP, use the whiteboard and markers to represent the Station 1


3 pseudo-code algorithms to a flowchart
Station 2

Station 3
Station 3 - Program # 1
Quick Reference - for Flowchart Shapes

Print “Enter test mark” Start


get mark
display “What is the test is out of?”
get testOutOf Input / output
avg = mark/testOutOf
Display “Percentage is ” + avg
If avg < 50 then processing
Display “fail”
Else
Display “pass”
false true
End if decision

End
Station 3 - Program # 2
Quick Reference - for Flowchart Shapes

display “Enter temperature in Fahrenheit” Start


get FTemp
CTemp = (FTemp - 32) x 5/9
Display “Temperature is ” + CTemp + “Celsius” Input / output
If CTemp < 0 then
Display “it’s cold”
Else if CTemp < 15 then processing
Display “it’s chilly”
Else
Display “it’s nice outside”
false true
End if decision

End
Station 3 - Program # 3
Quick Reference - for Flowchart Shapes

Set z = 0 Start
Set c = 0
display “Enter number of calculations”
Get x Input / output
Repeat x times
Output “Enter number”
Get y processing
Add y to z
Increase c by 1
End repeat
false true
If c not equal to 0 then decision
Calculate value = z divided by c
display value
End if

End
Reflection 1 of 2

From station #1, how will this sort of analysis in problem solving (into IPO table) help with creating
programs? What are the benefits vs just doing it in your head?

Anthony: From station #1, putting problems into an IPO table would help with creating future programs
because in the end, all the program does is input, process, and then output. Through creating an IPO
table, you break down your ideas and problems into its respective categories and can code in sections.
However, if you just did it in your head, you’d lose track of your code and what you’re doing and might
have an error you have no idea where.

Take a screen capture of your answer and post on your Learning Blog
Reflection 1 of 2

From station #1, how will this sort of analysis in problem solving (into IPO table) help with creating
programs? What are the benefits vs just doing it in your head?

This sort of analysis in problem solving helps with creating programs by fleshing out the code
and plans it out before you start coding (kinda like pseudo code). This can help make the
programming process smoother and minimize bugs. Writing it down rather than just doing it
your head makes it easier to cover all bases, seeing the “full picture”, and helps with
retention.

Take a screen capture of your answer and post on your Learning Blog
Reflection 2 of 2

From stations #2 and #3, (before starting to writing code) what are some of the benefits to designing
solutions through Flowcharting? And, what are some of the benefits to designing solutions through
writing (pseudo-code) Algorithms?

From station #3, I found that some of the benefits through flowcharting is that it is basically a blueprint
for your program. If any errors occur, you can just debug your program through analyzing the program
and categorizing different parts of the program with the flowchart shapes. This also ties in to the
flowcharts benefits of thinking through the logic of the system to see if the program makes sense.

From station #2, benefits of designing solutions through writing pseudocode algorithms is that it can be
easily converted into actual programming languages and its also easily understandable. Additionally
using a trace table also makes you think like a computer since you break down input and set values and
calculate the output values.

Take a screen capture of your answer and post on your Learning Blog
Reflection 2 of 2

From stations #2 and #3, (before starting to writing code) what are some of the benefits to designing
solutions through Flowcharting? And, what are some of the benefits to designing solutions through
writing (pseudo-code) Algorithms?

Flowcharting and pseudocode can help model the program before you actually start writing the code, it helps plan
out what commands, functions, and procedures you may end up using, as well as how you may layout the code.
This can help you prevent backtracking and restarting midway through the coding process due to a mistake or
change in mind.

Take a screen capture of your answer and post on your Learning Blog

You might also like