Day 4 : Programming for Kids : Data Types and Variables

Anuj Agarwal
2 min readFeb 23, 2023

--

Day 4: Data Types and Variables

Learning Material:

  1. Video: Watch a short video on data types and variables in programming. Here is an example video: https://www.youtube.com/watch?v=_JLbMvnGxj8
  2. Article: Read an article that explains the different data types and how to use variables in Python. Here is an example article: https://www.w3schools.com/python/python_variables.asp
  3. Interactive Tutorial: Complete an interactive tutorial that teaches you how to use data types and variables in Python. Here is an example tutorial: https://www.learnpython.org/en/Variables_and_Types

Exercise:

  1. Write 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!” using string concatenation.
  2. Write a program that calculates the area of a circle. The program should prompt the user for the radius of the circle, and then calculate and print out the area of the circle.
  3. Write a program that converts a given number of seconds to minutes and seconds. The program should prompt the user for the number of seconds, and then calculate and print out the equivalent time in minutes and seconds.
  4. Write a program that prompts the user for a temperature in Fahrenheit, and then converts it to Celsius using the formula C = (F — 32) * 5/9. The program should then print out the temperature in Celsius.

These exercises are designed to help the student practice using data types and variables 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.

Day 2: https://anujxagarwal.medium.com/day-2-programming-for-kids-python-program-3dc98e2df550
Day 3:https://anujxagarwal.medium.com/day-3-programming-for-kids-functions-and-control-structures-4595f1459650
Day 4:https://anujxagarwal.medium.com/day-4-programming-for-kids-data-types-and-variables-c85e4488bfa5
Day 5: https://anujxagarwal.medium.com/day-5-programming-for-kids-string-manipulation-e5ff0fdacfec
Day 6:https://anujxagarwal.medium.com/day-6-programming-for-kids-conditionals-and-logic-d7724c050d60
Day 7:https://anujxagarwal.medium.com/day-7-programming-for-kids-loops-f9fe7e712dcc
Day 8:https://anujxagarwal.medium.com/day-8-programming-for-kids-list-4d3c36bbda0d
Day 10: https://anujxagarwal.medium.com/day-10-programming-for-kids-fun-activities-bfb825fa11de
Solutions :https://anujxagarwal.medium.com/kids-programming-fun-activities-programs-ans-d20d7d4170b5

Happy Reading…Comments welcomed.

If this was helpful, hit the ❤️ and follow me.

--

--

Anuj Agarwal
Anuj Agarwal

Written by Anuj Agarwal

Director - Technology at Natwest. Product Manager and Technologist who loves to solve problems with innovative technological solutions.