Session 6: Conditional Programming
After this lesson, students will be able to:
- Describe about different control flow structures in Python.
- Describe about if-else statement in python.
- Implement if-else statement logic in Python codes.
- Prepare code for a grade calculator.
- Identify different types of logical operators in python.
- Analyse the problem, decide and evaluate conditions.
- Prepare code for identifying whether a given shape is triangle or not.
In this session, students will be learning about what is Conditional Programming. How decision making in a programming language is automated using conditional statements.
Students are given introduction to Control flow structure. The different types of control structures in programming. They are taught how to analyse a given conditional statement. They are also explained how to use an if-else conditional statement in a program. Then, we give them step-by-step guide to make a ‘grade calculator’. After this, they are taught about different logical operators in Python. Finally, we give them a step-by-step guide to identify ‘whether a given shape is triangle or not’.
- Create a project which calculates grades.
- Create a project which identifies whether a shape is a triangle or not
- Lecture Slide Contains the lecture slide. Teacher can use it as a tool to cover the concept during the classroom.
- Activity Sheet Contains the step by step process to complete the activity. Students and teachers can us it as a reference.
- Worksheet Contains the worksheet for taking quiz in the class.
- Solved Worksheet Contains the solved worksheet.
Title | Description | File |
---|---|---|
Grade calculator | The project demonstrates a grade calculator | https://learn.edustream.ae/wp-content/uploads/2022/06/CL9_CH6_grade-calculator_activity.sb3 |
Is it a triangle? | The project demonstrates whether a shape is a triangle or not | https://learn.edustream.ae/wp-content/uploads/2022/06/CL9_CH6_Is-it-a-triangle-or-not_activity.sb3 |
Title | Approximate Duration | Procedure | Reference Material |
---|---|---|---|
Control flow structure | 5 |
| Lecture Slide |
Activity : Grade calculator | 15 |
| PictoBlox file, Lecture Slide and Activity sheet |
Logical Operators | 5 |
| Lecture Slide |
Activity: Is it a triangle ? | 10 |
| PictoBlox file, Lecture Slide and Activity sheet |
Concluding the lecture | 5 |
| Lecture Slide |
- Make sure each PC has the latest version of PictoBlox installed and running.
- Make sure they write the script by selecting the appropriate sprite.
- Make sure they use the right palettes of Pictoblox Python interface for different functions while writing the code.
- Make sure students save their codes/scripts.
- Make sure they shut down the PC/Laptops.