
S3 SDD - selection statements
Presentation
•
Computers
•
3rd Grade
•
Practice Problem
•
Hard
G Alexander-Doyle
Used 9+ times
FREE Resource
7 Slides • 6 Questions
1
Selection statements
Python programming
2
Decisions
Real life is full of examples of consequences which occur when you make a decision. For example if you fail to complete maths or computing homework you may be given a detention or the school may contact home.
Similarly if you complete homework regularly to a good standard you would likely receive a star or be nominated for pupil of the month in the department.
3
Decisions in programming
A program can also make decisions and perform an action based around a condition being true. It can do this by using a selection statement. The words if and else are used to indicate which action should be performed in the event of a condition being true or false.
4
Decisions in programming
All programming languages will support the use of slection statements, they are a commonly used construct.
5
Fill in the Blanks
Type answer...
6
Decisions in programming
The following is an example of a simple IF... THEN ELSE... selection statement. it has been written in the SQA's reference language (this is a language which is similar to pseudocode).
7
Comparison operators
When coding selection statements in Python the following operators can be used:
Operator | Description |
|---|---|
== | Equal to |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
!= | Not equal to |
8
Comparison operators
When coding a selection statement, you must include the following:
Indentation - To indicate what line of code is run if a condition is met.
Colon - To indicate the beginning of a selection statement or loop.
9
Multiple Choice
Which of the following is used to indicate the beginning of a selection statement?
semi-colon
indentation
hash tag
colon
10
Fill in the Blanks
Type answer...
11
Fill in the Blanks
Type answer...
12
Fill in the Blanks
Type answer...
13
Fill in the Blanks
Type answer...
Selection statements
Python programming
Show answer
Auto Play
Slide 1 / 13
SLIDE
Similar Resources on Wayground
10 questions
Sound
Presentation
•
3rd Grade
10 questions
CENTRAL IDEA
Presentation
•
3rd Grade
9 questions
read and write
Presentation
•
3rd Grade
9 questions
Poems, Plays, and Prose
Presentation
•
3rd Grade
10 questions
scratch review
Presentation
•
4th Grade
10 questions
3rd Grade Multiplication Patterns
Presentation
•
3rd Grade
10 questions
Commas in a series
Presentation
•
3rd Grade
10 questions
Theme Practice
Presentation
•
3rd Grade
Popular Resources on Wayground
19 questions
Naming Polygons
Quiz
•
3rd Grade
10 questions
Prime Factorization
Quiz
•
6th Grade
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
Discover more resources for Computers
19 questions
Naming Polygons
Quiz
•
3rd Grade
20 questions
Math Review
Quiz
•
3rd Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Classifying Quadrilaterals
Quiz
•
3rd - 4th Grade
22 questions
Math Review
Quiz
•
3rd Grade
29 questions
FAST Math Review
Quiz
•
3rd Grade