Search Header Logo
Selection and Iteration

Selection and Iteration

Assessment

Presentation

Instructional Technology

6th Grade

Practice Problem

Medium

Created by

ANDRES FELIPE GOMEZ-CASSERES ESPINOSA

Used 147+ times

FREE Resource

14 Slides • 6 Questions

1

Selection and Iteration

Tuesday, January the 11th, 2023

Made by Andrés Gomez

2

Agenda

  1. Flowchart Recap (10 min)

  2. Selection

  3. Iteration

  4. Activity Dfd

Selection and Iteration

3

Flowchart Recap

Go to the Virtual Classroom and Complete the Activity called "Flowchart Review". Call the teacher when you finish it.

Flowcharts

Selection and Iteration

4

media

Iteration, or looping, is the repetition of some instructions in an algorithm. It gives computers much of their power. They can repeat a sequence of steps as often as necessary.

Adapted from: https://www.britannica.com/technology/iteration-programming

Image: Link

Selection and Iteration

Iteration

5

Multiple Select

From the flowcharts presented, which ones use iteration?

1

Flowchart A

2

Flowchart B

3

Flowchart C

4

Flowchart D

6

media

Selection is a programming construct where a section of code is run only if a condition is met. In programming, there are occasions when a decision needs to be made. Selection is the process of making a decision. The result of the decision determines which path the program will take next.

Taken from: Link

Image: Link

Selection and Iteration

Selection

7

Multiple Select

From the flowcharts presented, which ones use selection?

1

Flowchart A

2

Flowchart B

3

Flowchart C

4

Flowchart D

8

Let's use Dfd

Dfd is a free program to create and evaluate flowcharts.

Now, we are going see how to make a flowchart in it.

Selection and Iteration

media

9

media

Check if you can identify what is each symbol and what does this flowchart do.

Selection and Iteration

Let's see an example...

10

Activity #1

media

Try to create a flowchart in Dfd that collects a number and if it is greater than 10, present it multiplied by 10. Otherwise, divide it by two and present the result.

11

Let's continue with iteration...

When you program with a high-level programming language, there are two important constructs through which you can use iteration.

They show us the relation between selection and iteration.

12

media

A While loop evaluates a condition and, if it is true, the statements are executed.

The condition is always evaluated at the beginning.

It is normally used when you don't know how many time you have to repeat the intructions.

Selection and Iteration

While loop

13

A For loop increments or decrements a variable through a range of values.

It is best used when you know how many times you have to repeat the intructions.

Selection and Iteration

For loop

media

14

Check if you can identify if there is a while or a for loop

Selection and Iteration

Let's see an example...

media

15

Let's check our understanding..

In the next questions, you will be asked whether a problem can be solve with For or While loops.

There is only one correct answer.

Let's start it!!

Some text here about the topic of discussion

16

Multiple Choice

A flowchart that sums up ten numbers.

1

Best solved with a WHILE loop

2

Best solved with a FOR loop

17

Multiple Choice

A flowchart that sums up the numbers between two numbers given by the user.

1

Best solved with a WHILE loop

2

Best solved with a FOR loop

18

Multiple Choice

A flowchart that multiplies ten numbers given by the user.

1

Best solved with a WHILE loop

2

Best solved with a FOR loop

19

Multiple Choice

A robot that moves forward until it detects an obstacle.

1

Best solved with a WHILE loop

2

Best solved with a FOR loop

20

Create a flowchart that requires a number from the user and multiplies it by two and presents it to the user every iteration.

Activity #1

media

Selection and Iteration

Tuesday, January the 11th, 2023

Made by Andrés Gomez

Show answer

Auto Play

Slide 1 / 20

SLIDE