Structured Programming
Time 10 mins

Difficulty Module 1
Prerequisites What is Code?
Departments Career & Technology Studies
Authors Sandra Kuipers
Groupings Individual
Minimum Year Group None

Blurb

This unit explores the nature and design of structured programming.

License

This work is shared under the following license: Creative Commons BY-SA-NC

Outline

Learner Outcomes
Students will:
  • ...
Competency Focus
  • ...
Interdisciplinary Connections
  • ...
Reflection
What was successful? What needs changing? Alternative Assessments and Lesson Ideas? What other Differentiation Ideas/Plans could be used?
  • ...
Credits
Any CC attribution, thanks, credit, etc.

This page requires you to be logged in to access it. Please login and try again.
5 mins
Introduction
Getting Started

In structured programming, the program is made as a single structure executed in a serial and structured manner. The code will execute instruction by instruction one after the other, sometimes returning values as it goes. It doesn’t support the possibility of jumping from one instruction to some other with the help of any statement like GOTO, etc. 

Non-structured programming uses commands like GOTO. When executed, it can jump from line of code to line of code. It can be difficult to keep track of the flow of events and troubleshoot. Sometimes the program can crash because it cannot get back from the GOTO or move on.

Structured programming follows a series of commands in order. The structured program mainly consists of three types of elements:

  • Selection Statements
  • Sequence Statements
  • Iteration Statements

Advantages of Structured Programming Approach:

  1. Easier to read and understand
  2. User Friendly
  3. Easier to Maintain
  4. Mainly problem based instead of being machine-based
  5. Development is easier as it requires less effort and time
  6. Easier to Debug
  7. Machine-Independent, mostly.

Sequence Statements
Step By Step
  • The order that commands are executed by a computer allows us to carry out tasks that have multiple steps.
  • Sequence statements follow a specific order to make sure that a program works the way the creator intended.

5 mins
Selection Statements
Conditionals
  • Selection statements allow a program to test several conditions, and execute instructions based on which condition is true. 
  • Having selection statements in a program make the program more flexible.
  • They rely on Boolean logic
  • Examples are if / else if / then statements

Iteration Statements
Loops
  • Iteration statements are a set of instructions or structures that are repeated in a sequence a specified number of times or until a condition is met. 
  • Often they are called loops
  • Examples are for or / when / do statements

Show What You Know
Evidence
  • You will need to use all of these different types of statements in your coding

  • Open up your Google slides from the Computer Science unit.
  • Add one slide called Structured Programming:
    • Include a short definition, in your own words.
    • At least one link to a website or video that helps explain this concept.
  • Then, add one slide for each of the following data types:
    • Sequence Statements
    • Selection Statements
    • Iteration Statements
  • For each slide, add:
    • A short definition, in your own words.
    • A few lines of pseudocode or code to show how these statements work
    • A link to a website that helps explain these statements
  • Remember to add to your sources and citations list
    • It should be:
      • Alphabetical
      • Double spaced
      • Reverse Indented
  • Once you have finished, submit the link to your slideshow as evidence of learning in this unit.

Links

Images





There are no records to display.
There are no records to display.
Powered by Gibbon v28.0.00dev

Founded by Ross Parker at ICHK Secondary | Built by Ross Parker, Sandra Kuipers and the Gibbon community
Copyright © Gibbon Foundation 2010-2024 | Gibbon™ of Gibbon Education Ltd. (Hong Kong)
Created under the GNU GPL | Credits | Translators | Support