0% found this document useful (0 votes)
24 views13 pages

Flowchart Basics for Grade 7 Programming

This document is a Grade 7 educational resource focused on programming development, specifically covering multi-condition selection control structures, flowcharts, and repetition control structures. It emphasizes problem decomposition, the use of algorithms, and Scratch programming techniques. Additionally, it includes exercises to reinforce learning about control structures and flowchart creation.

Uploaded by

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

Flowchart Basics for Grade 7 Programming

This document is a Grade 7 educational resource focused on programming development, specifically covering multi-condition selection control structures, flowcharts, and repetition control structures. It emphasizes problem decomposition, the use of algorithms, and Scratch programming techniques. Additionally, it includes exercises to reinforce learning about control structures and flowchart creation.

Uploaded by

Deshani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Grade 7

UNIT 5
PROGRAMME
DEVELOPMENT

D Learning Academy by Deshani Jayasuriya

Copyright © by D Learning Academy – Deshani Jayasuriya


All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form
or by any means, including photocopying, recording, or other electronic or mechanical methods, without
the prior written permission of the publisher, except in the case of brief quotations embodied in critical
reviews and certain other noncommercial uses permitted by copyright law.
D Learning Academy Grade 7

CONTENT

IN THIS SECTION:

This chapter will cover the following:

• Multi-condition selection control


structures

• Use of flowcharts to solve


problems with many conditions

• Repetition control structures

• Use of flow charts to solve


problems with repetition
procedures

• Development of Scratch program


using selection and repetition
control structures

• Solutions with flow charts having


nested loops

D Learning Academy by Deshani Jayasuriya


D Learning Academy Grade 7
Decomposing the Problems

• A problem can be simple or complex according to its nature.


• It is rather difficult to perceive and understand a complex problem when compared with a simple problem. It is
essential to understand a problem thoroughly before going to solve it.
• So it will be easier to find a solution to a complex problem after decomposing it into smaller sub-problems.

Basic mathematical function which include addition, subtraction, multiplication and division of a whole number.

Flow Charts present the steps of an algorithm graphically. The following standard symbols use to draw flow charts.

Symbol Name Symbol Function


Oval Use to present the Start & End

Parallelogram Use to present the Input & Output

Rectangle Use to present the Process

Diamond Use to make a Decision.

Arrows Use to present the Data Flows.

Circle Use to connect Data Flows.


D Learning Academy Grade 7
Algorithm
An algorithm may include one or more control structures out of three. Three types of control structures are shown below.

Sequence
If the steps from the beginning to the end of an algorithm are carried out in a strict order, it is called a sequence.
D Learning Academy Grade 7

Simple Selection
Simple selection is selecting one option out of two given options under a certain condition. For example, one such choice
is the selection of “head” or “tail” with the toss of a coin.
D Learning Academy Grade 7
Simple selection has one condition with two options. A selection is made out of the two conditions. If the condition is
true, one option is selected and if not, the other option gets selected.

Selection out of many options

Selection out of many options is about selecting one out of more than two options.
D Learning Academy Grade 7

Scratch repetition control structures


• A repetition will take place depending on whether a condition is satisfied or not satisfied.
• Execution of an instruction or several instructions in an algorithm repeatedly until a condition is satisfied is
called repetition.
• Three repetition control structures are available to build Scratch programming. They are shown below;
• Since your childhood, you used to save money by using a till to put money.
• The one who is used to save money in a till, will always put money (again and again) repeatedly until the till fills.
So, here the process of putting money is repeated until the condition that is ‘till becomes full’ is satisfied.

Checking of condition for repetition can take place in two ways.

1. Check the condition before repetition starts.


2. Check the condition after functioning once.
D Learning Academy Grade 7
Ask for input with ‘What’s the number?’

If even number, output should be ‘number is an even number’ if answer <30

Forever Loop Example:-


D Learning Academy Grade 7
Programming with problem analysis
Output is ‘What is the value?’, if answer equals 1,2,3,4,5, or 6. Sprite will say the value

If the number is less than 5, say the number, repeat it five times
D Learning Academy Grade 7
If the remainder is 0 when mod is used, its an even number

Make Sassy and Ballerina Dance


D Learning Academy Grade 7

Version - Scratch 2.0 Version - Scratch 3.0

Exercises

[Link] 2 control structures


2. How can you move the sprites?
3. How do you broadcast messages?
4. Which function is used to add voice to sprite?
5. Which function is used to change backdrop?
6. Design the following develop program on Scratch
Ask for the day of the week and decide if it’s a weekday or weekend and do the assigned work

What is the day of the week?


If a weekday (Monday, Tuesday, Wednesday, Thursday, Friday) -> Go to School
If a weekend (Saturday, Sunday) -> Do your homework and have fun

[Link] the relevant input output, process to get the sum of two numbers, multiply the two numbers and
draw the flow chart and develop program on Scratch
• Input-……………………………………………………………………………………………………………
• Output-…………………………………………………………………………………………………………
• Process-…………………………………………………………………………………………………………
D Learning Academy Grade 7
8. What is an algorithm?
...................................................................................................................................................................
.................................................................................................................................................................
9. What is a flow chart?
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
10. Name the following codes used for flow charts.
D Learning Academy Grade 7

Common questions

Powered by AI

Repetition control structures in Scratch programming are important because they allow a segment of code to be executed repeatedly based on a condition, which is essential for tasks that require iteration, such as animation or repeated actions. For example, a repetitive process can be simulated by having a sprite perform an action like a dance move continuously until a certain input, such as 'stop', is received. This mirrors the example of putting money into a till repeatedly until it is full, demonstrating real-life applications of such structures .

Simple selection involves choosing between two options based on a single condition, such as deciding between 'head' or 'tail' in a coin toss. Selection out of many options, however, involves making a decision from more than two alternatives, requiring more complex logic to determine which path the program should take based on multiple conditions .

To create a Scratch program that categorizes a day as a weekday or weekend, the steps include: asking the user for the day of the week, checking if the input matches a weekday (Monday through Friday) or a weekend (Saturday or Sunday), and providing the appropriate response (e.g., 'Go to School' for weekdays and 'Do your homework and have fun' for weekends). The decision point involves evaluating which list the user's input falls into, determining the flow of the program based on this condition .

Flowcharts are beneficial for algorithm development as they provide a visual representation of the workflow, making it easier to understand, debug, and communicate the process. Standard symbols used in flowcharts include ovals for start and end points, parallelograms for inputs and outputs, rectangles for processes, diamonds for decision points, arrows for data flow, and circles to connect data flows. These symbols help clearly delineate the various steps and decision points within an algorithm .

Flowcharts and algorithms complement each other by providing both a visual and textual representation of a process, enhancing understanding and communication among developers. Algorithms provide detailed instruction sets for computations, while flowcharts offer a simplified, visual outline of the same process, highlighting steps and decision points clearly. Together, they facilitate the development, interpretation, and debugging of complex computational solutions .

Decomposition aids in addressing complex problems by breaking them down into smaller, more manageable parts or sub-problems. This approach simplifies the understanding and solution development process, making it easier to tackle each part individually. In programming, decomposition allows developers to focus on specific tasks and later integrate their solutions into a cohesive program, ensuring better organization and debugging of the code .

In Scratch programming, repetition is illustrated through the example of saving money until a till becomes full. This real-life scenario parallels programming repetition where a task is performed continuously until a certain condition is met, such as a sprite performing a repeated action in Scratch until the programmer defines an end condition. This analogy helps learners relate programming concepts to everyday activities .

Control structures in algorithm design help dictate the flow of the algorithm and are crucial for managing how instructions are executed. They enable programmers to define sequences, selections, and repeat executions, which are essential for solving complex problems efficiently by breaking them down into manageable steps. Sequences ensure that steps are executed in order, selections allow for decision-making between different paths based on conditions, and repetitions enable repeated execution of parts of the code until certain conditions are met .

D Learning Academy suggests a combination of theoretical instruction and practical application through tools like Scratch. Techniques involve teaching multi-condition selection control structures, the use of flowcharts to visualize problems, decomposition for problem-solving, and the integration of repetition and selection in programming exercises. This approach helps students grasp foundational concepts while applying them in engaging and interactive coding environments .

Checking conditions before and after loops in programming is critical to ensure that loops execute correctly and efficiently. Pre-checking conditions prevents the loop from running if initial conditions are not met, avoiding unnecessary computations. Post-condition checks ensure that loops terminate appropriately after all necessary repetitions are completed, maintaining program efficiency and preventing infinite loops. This practice is crucial for robust and error-free program execution .

You might also like