Search this site
Embedded Files
Skip to main content
Skip to navigation
ICS3C/3U Mr. Atkinson
Home
Units
Introduction
Intro-01
Intro-02
Intro-03
Intro-04
Unit 0
Unit 0-01
Unit 0-02
Unit 0-03
Unit 0-04
Unit 0-05
Unit 1
Unit 1-01
Unit 1-02
Unit 1-03
Unit 1-04
Unit 1-05
Unit 1-06
Unit 2
Unit 2-01
Unit 2-02
Unit 3
Unit 3-01
Unit 3-02
Unit 3-03
Unit 3-04
Unit 3-05
Unit 3-06
Unit 3-07
Unit 3-08
Unit 3-09
Unit 3-10
Unit 4
Unit 4-01
Unit 4-02
Unit 4-03
Unit 4-04
Unit 4-05
Unit 4-06
Unit 5
Unit 5-01
Unit 5-02
Unit 5-03
Unit 5-04
Unit 5-05
Unit 5-06
Unit 6
Unit 6-01
Unit 6-02
Unit 6-03
Unit 6-04
Unit 6-05
Unit 6-06
Unit 7
Unit 7-01
Unit 7-02
Unit 8
Unit 8-01
Unit 8-02
Unit 8-03
Unit 8-04
Unit 8-05
Unit 8-06
Unit 8-07
Unit 8-08
Unit 8-09
Assignments
Assignment 1
Assignment 2
Assignment 3
Assignment 4
Assignment 5
Assignment 6
Assignment 7
Assignment 8
Handing In Process
Final Project
Final Independent Project Outline
Final Project Example
Step 01
Step 02
Step 03
Step 04
Step 06
Step 07
Step 08
Step 09
Step 10
Resources
Git
Git + Graphio
Calendar
ICS3C/3U Mr. Atkinson
Home
Units
Introduction
Intro-01
Intro-02
Intro-03
Intro-04
Unit 0
Unit 0-01
Unit 0-02
Unit 0-03
Unit 0-04
Unit 0-05
Unit 1
Unit 1-01
Unit 1-02
Unit 1-03
Unit 1-04
Unit 1-05
Unit 1-06
Unit 2
Unit 2-01
Unit 2-02
Unit 3
Unit 3-01
Unit 3-02
Unit 3-03
Unit 3-04
Unit 3-05
Unit 3-06
Unit 3-07
Unit 3-08
Unit 3-09
Unit 3-10
Unit 4
Unit 4-01
Unit 4-02
Unit 4-03
Unit 4-04
Unit 4-05
Unit 4-06
Unit 5
Unit 5-01
Unit 5-02
Unit 5-03
Unit 5-04
Unit 5-05
Unit 5-06
Unit 6
Unit 6-01
Unit 6-02
Unit 6-03
Unit 6-04
Unit 6-05
Unit 6-06
Unit 7
Unit 7-01
Unit 7-02
Unit 8
Unit 8-01
Unit 8-02
Unit 8-03
Unit 8-04
Unit 8-05
Unit 8-06
Unit 8-07
Unit 8-08
Unit 8-09
Assignments
Assignment 1
Assignment 2
Assignment 3
Assignment 4
Assignment 5
Assignment 6
Assignment 7
Assignment 8
Handing In Process
Final Project
Final Independent Project Outline
Final Project Example
Step 01
Step 02
Step 03
Step 04
Step 06
Step 07
Step 08
Step 09
Step 10
Resources
Git
Git + Graphio
Calendar
More
Home
Units
Introduction
Intro-01
Intro-02
Intro-03
Intro-04
Unit 0
Unit 0-01
Unit 0-02
Unit 0-03
Unit 0-04
Unit 0-05
Unit 1
Unit 1-01
Unit 1-02
Unit 1-03
Unit 1-04
Unit 1-05
Unit 1-06
Unit 2
Unit 2-01
Unit 2-02
Unit 3
Unit 3-01
Unit 3-02
Unit 3-03
Unit 3-04
Unit 3-05
Unit 3-06
Unit 3-07
Unit 3-08
Unit 3-09
Unit 3-10
Unit 4
Unit 4-01
Unit 4-02
Unit 4-03
Unit 4-04
Unit 4-05
Unit 4-06
Unit 5
Unit 5-01
Unit 5-02
Unit 5-03
Unit 5-04
Unit 5-05
Unit 5-06
Unit 6
Unit 6-01
Unit 6-02
Unit 6-03
Unit 6-04
Unit 6-05
Unit 6-06
Unit 7
Unit 7-01
Unit 7-02
Unit 8
Unit 8-01
Unit 8-02
Unit 8-03
Unit 8-04
Unit 8-05
Unit 8-06
Unit 8-07
Unit 8-08
Unit 8-09
Assignments
Assignment 1
Assignment 2
Assignment 3
Assignment 4
Assignment 5
Assignment 6
Assignment 7
Assignment 8
Handing In Process
Final Project
Final Independent Project Outline
Final Project Example
Step 01
Step 02
Step 03
Step 04
Step 06
Step 07
Step 08
Step 09
Step 10
Resources
Git
Git + Graphio
Calendar
Unit 3-02
Learning Outcome
At the end of this lesson, you will be able to:
understand and use an if ... then ... else statement
Movie Watching
watch "Play Value,
Atari vs Nintendo
"
watch one way to truly
generate random numbers
Review
if ... then statements
Lesson
go over
how to generate a random number in Python
go over "if ... then ... else", Chapter 3
Computer Based Problem Solving
look at "Too Many Student" program below
Activity
re-create the "Generate a Random Number" program, so you are conformable creating random numbers
create, in your groups, GUI Design, Top-down, flowchart
then write the code
Daily Assignment
re-create the "Number Guessing Game" program from before
use an If ... Then ... Else, so the user is told if the number is correct or wrong
use the random number generator to generate a new random number every time the program is started over
the number to guess would, therefore, have to be a Global variable
Extra
create the above program in a second language
Code Links
Too Many Students B
Guessing Game
Homework!
read over "if ... then ... elseif ...", Chapter 3
Computer Based Problem Solving
Report abuse
Report abuse