Day 2 : Programming for Kids : Python Program
2 min readFeb 23, 2023
Writing your first program in Python
Learning Material:
- Video: Watch a short tutorial video on how to write your first program in Python. Here is an example video: https://www.youtube.com/watch?v=rfscVS0vtbw
- Article: Read an article that explains the basic syntax and structure of a Python program. Here is an example article: https://www.w3schools.com/python/python_syntax.asp
- Interactive Tutorial: Complete an interactive tutorial that guides you through writing a simple Python program. Here is an example tutorial: https://www.learnpython.org/en/Hello%2C_World%21
Exercise:
- Create a program that calculates the area of a rectangle. The program should prompt the user for the length and width of the rectangle, calculate the area, and then print out the result to the console.
- Create a program that converts temperature in Celsius to Fahrenheit. The program should prompt the user for the temperature in Celsius, convert it to Fahrenheit using the formula F = C * 9/5 + 32, and then print out the result to the console.
- Create a program that asks the user to enter two numbers, and then prints out the sum, difference, product, and quotient of the two numbers.
- Create a program that prompts the user to enter their name and age, and then prints out a message that says “Hello, [name], you are [age] years old!”
These exercises are designed to help the student practice writing programs in Python and reinforce the concepts learned in the learning material. As with Day 1, the exercises should be challenging but not overwhelming, and provide the student with the opportunity to practice writing code on their own.