
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 Blank
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 Blank
Type answer...
11
Fill in the Blank
Type answer...
12
Fill in the Blank
Type answer...
13
Fill in the Blank
Type answer...
Selection statements
Python programming
Show answer
Auto Play
Slide 1 / 13
SLIDE
Similar Resources on Wayground
11 questions
Suffixes -er and -or
Presentation
•
3rd Grade
10 questions
NARRATIVE TEXT
Presentation
•
3rd Grade
10 questions
Division Using Equal Groups
Presentation
•
3rd Grade
10 questions
Present Perfect
Presentation
•
KG - 3rd Grade
10 questions
Wolf Island Vocabulary
Presentation
•
3rd Grade
9 questions
ENGLISH
Presentation
•
3rd Grade
9 questions
¿Qué estudia la filosofía?
Presentation
•
KG
10 questions
COMO LLEGA EL INTERNET A CASA
Presentation
•
3rd Grade
Popular Resources on Wayground
10 questions
5.P.1.3 Distance/Time Graphs
Quiz
•
5th Grade
10 questions
Fire Drill
Quiz
•
2nd - 5th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
22 questions
School Wide Vocab Group 1 Master
Quiz
•
6th - 8th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade
Discover more resources for Computers
10 questions
Fire Drill
Quiz
•
2nd - 5th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Quadrilaterals
Quiz
•
3rd Grade
22 questions
fractions
Quiz
•
3rd Grade
10 questions
Fire Safety
Quiz
•
3rd Grade
15 questions
Rounding to the Nearest Ten and Hundreds
Quiz
•
3rd Grade
24 questions
Comparing Fractions
Quiz
•
3rd Grade