Session 7: Loops in Python – While Loop
After this lesson, students will be able to:
- Define different types of loops available in python.
- Describe about the usage, and working of a loop.
- Analyse and decide on an appropriate combination of Loops and Conditions.
- Prepare a coding project on number counter using quarky.
In this session, students will be learning about, the while loop concept and how while loops can be used in different situations. How they can design simple applications having iterative nature.
Students are introduced to the concept of loops in python. The benefits of using loops in programming, and what are various loops available in python programming language. Students are then taught how they can write a code using the concept of while loop and create applications on their own. Finally, we give them a step-by-step guide to make a project using Quarky along with PictoBlox. They will be creating a project on number counter using Quarky.
- Creating a project that uses Quarky to count numbers from ‘1-9’ and from ‘9-1’ using the concept of while loop.
Title | Description | File |
---|---|---|
Number counter using Quarky | This project demonstrates how number counter can be made using quarky | https://learn.edustream.ae/wp-content/uploads/2022/06/CL9_CH7_Number-counter-using-quarkycombined-code.sb3 |
Title | Approximate Duration | Procedure | Reference Material |
---|---|---|---|
Introduction to loops | 5 |
| Lecture Slide |
While loop | 10 |
| Lecture Slide |
Activity: Number counter using Quarky | 20 |
| 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 all the Quarky robots are in working condition and are fully charged.
- Make sure all the Quarky robots have a working USB cable with them. If you are using Bluetooth to connect Quarky with PictoBlox, make sure that you have downloaded the PictoBlox Link and it stays well connected.
- Make sure that all the devices running PictoBlox has a working webcam as well as bluetooth.
- 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.
- Make sure they return Quarky and USB cable in good condition.