Day 7: Programming for Kids: Loops
1 min readFeb 23, 2023
Day 7: Loops
Learning Material:
- Video: Watch a short video on loops in programming. Here is an example video: https://www.youtube.com/watch?v=6iF8Xb7Z3wQ
- Article: Read an article that explains how to use loops in Python. Here is an example article: https://www.w3schools.com/python/python_while_loops.asp
- Interactive Tutorial: Complete an interactive tutorial that teaches you how to use loops in Python. Here is an example tutorial: https://www.learnpython.org/en/Loops
Exercise:
- Write a program that prints out the numbers from 1 to 10.
- Write a program that prompts the user for a number, and then prints out the multiplication table for that number up to 10.
- Write a program that prompts the user for a string, and then prints out each character in the string on a separate line.
- Write a program that prompts the user for a number, and then prints out whether the number is a prime number or not.
These exercises are designed to help the student practice using loops in Python, and reinforce the concepts learned in the learning material. As with the previous days, the exercises should be challenging but not overwhelming, and provide the student with the opportunity to practice writing code on their own.