
Higher SDD - Count occurrences
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
G Alexander-Doyle
Used 2+ times
FREE Resource
16 Slides • 5 Questions
1
2
Aims
We are learning how to implement a count occurrence algorithm which traverse arrays or arrays of records.
Achievements (theory)
I can write the code required to implement the standard algorithms in Python. Specifically, I can:
initialise and update variables
loop through an array/array of records with a fixed or conditional loop
set up a condition to test a criteria
return the position of a given piece of data within and array/array of records
I can predict the how the values of variables will change during the execution of a standard algorithm
Achievements (practical)
I can implement a count occurrence algorithm in Python.
3
4
5
6
Match
Match the construct with the description below.
Assignment
Selection
Fixed iteration
Conditional iteration
Updates or initialises a variable
Performs an action when a condition is m
Repeats code a set number of times
Repeats code until a condition is met
Updates or initialises a variable
Performs an action when a condition is m
Repeats code a set number of times
Repeats code until a condition is met
7
Categorize
average = total/10
total = 0
count = count + 1
if age > 18:
Set result to num1 + num2
name = 'John'
if temperature < 30:
if status == 'active':
if grade >= 60:
if day == 'Monday':
for i in range(10):
repeat 5 times:
for counter in range (number):
while count <= 10:
while found == False:
Repeat ... Until found = True
while score <0 or score >100:
Repeat ... until found = Tru or end of list
for x in range (len(array)):
for each pupil in pupils_array do
Categorise the lines of code into the correct construct.
8
9
10
Reorder
Put the constructs in a Higher Standard algorithm into the correct order.
Set up variables
Loop through the array
If statement
Update variables
End of algorithm / Extras
11
12
13
14
Open Ended
What would be the output from this program if the name "Callum" were entered by the user?
15
16
17
18
19
Open Ended
What would be the output from this program if the name the number were entered by the user?
20
Aims
We are learning how to implement a count occurrence algorithm which traverse arrays or arrays of records.
Achievements (theory)
I can write the code required to implement the standard algorithms in Python. Specifically, I can:
initialise and update variables
loop through an array/array of records with a fixed or conditional loop
set up a condition to test a criteria
return the position of a given piece of data within and array/array of records
I can predict the how the values of variables will change during the execution of a standard algorithm
Achievements (practical)
I can implement a count occurrence algorithm in Python.
21
Show answer
Auto Play
Slide 1 / 21
SLIDE
Similar Resources on Wayground
16 questions
Canada
Presentation
•
9th - 12th Grade
17 questions
Genetics Review Part 2 (Practice)
Presentation
•
6th - 9th Grade
15 questions
How to Make a Program for Theater Productions
Presentation
•
9th - 12th Grade
15 questions
Physical and Chemical Changes
Presentation
•
9th - 12th Grade
17 questions
Preterite Tense
Presentation
•
9th - 12th Grade
15 questions
Dictionary Skills
Presentation
•
9th - 12th Grade
17 questions
Acids & Bases - Molarity & Dilutions
Presentation
•
9th - 12th Grade
16 questions
Data Representation - Sound
Presentation
•
9th - 11th Grade
Popular Resources on Wayground
10 questions
HCS SCI 03 Summer School Review 4
Quiz
•
3rd Grade
11 questions
HSMS - Standard Response Protocol
Quiz
•
6th - 8th Grade
16 questions
1.1-1.2 Quiz Review
Quiz
•
9th - 12th Grade
12 questions
Exponent Expressions
Quiz
•
6th Grade
20 questions
Adding and Subtracting Integers
Quiz
•
6th - 7th Grade
11 questions
Northeast States
Quiz
•
3rd - 4th Grade
10 questions
Characterization
Quiz
•
3rd - 7th Grade
10 questions
Common Denominators
Quiz
•
5th Grade