Day 6 : Programming for Kids : Conditionals and Logic
Day 6: Conditionals and Logic
Learning Material:
- Video: Watch a short video on conditionals and logic in programming. Here is an example video: https://www.youtube.com/watch?v=DZwmZ8Usvnk
- Article: Read an article that explains how to use conditional statements and logical operators in Python. Here is an example article: https://www.w3schools.com/python/python_conditions.asp
- Interactive Tutorial: Complete an interactive tutorial that teaches you how to use conditional statements and logical operators in Python. Here is an example tutorial: https://www.learnpython.org/en/Conditions
Exercise:
- Write a program that prompts the user for a number, and then prints out whether the number is positive, negative, or zero.
- Write a program that prompts the user for their age, and then prints out whether they are old enough to vote (age 18 or older).
- Write a program that prompts the user for a number, and then prints out whether the number is even or odd.
- Write a program that prompts the user for a letter of the alphabet, and then prints out whether the letter is a vowel or a consonant.
These exercises are designed to help the student practice using conditional statements and logical operators 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.
Happy Reading…Comments welcomed.
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