WEEK 1 – DAY 2: PYTHON CONTROL & DATA
STRUCTURES
Date: ________________________
🎯 TODAY'S OBJECTIVE (4 Hours):
Deepen understanding of core Python concepts: loops, conditionals, functions, and data structures
(lists, dictionaries). Start applying these concepts through small scripts and simple projects.
1. HOUR-BY-HOUR EXECUTION
🕒 Hour 1–2: Structured Learning
Concepts:
Loops: for, while
Conditionals: if, elif, else
Functions: defining, parameters, return values
Data Structures: lists, tuples, dictionaries, sets
Syntax / Examples for:
Looping over lists/dictionaries
Writing simple functions with inputs and outputs
🕒 Hour 3: Practice Block
Solve these problems (No copying):
1. Create a list of 5 numbers, print each number using a loop.
2. Write a function to sum all numbers in a list.
3. Create a dictionary for a student (name, age, degree) and print each key-
value pair.
4. Write a function to check if a number is even or odd.
5. Use a while loop to print numbers 1 to 10.
6. Write a function to calculate factorial of a number.
7. Write a calculator function that can add, subtract, multiply, divide two numbers
based on user input.
8. Write a script to check if a given key exists in a dictionary.
9. Create a set of unique items from a list with duplicates and print it.
10. Use conditionals to classify an input number as positive, negative, or zero.
🕒 Hour 4: GitHub Setup
Create folder: python-week1-practice/day2
Upload all Day 2 scripts with clear problem comments
Write or update [Link] with Day 2 summary and learning notes
2. 10 PRACTICE PROBLEMS (SUMMARY)
# Problem Description
1 Loop through list and print each item
2 Sum numbers in a list via function
3 Create and print student dictionary
4 Check even/odd number function
5 Print numbers 1–10 with while loop
6 Factorial function
7 Calculator function for 4 operations
8 Check key existence in dictionary
9 Create set from list and print unique items
10 Classify number positive/negative/zero
3. END-OF-DAY SELF TEST
☐ Completed all 10 practice problems
☐ Uploaded code to GitHub
Can you explain clearly?
☐ How do loops differ (for vs while)?
☐ How do functions work and why use them?
☐ What are the key differences between lists, tuples, dictionaries, and sets?
☐ How do conditionals control program flow?
4. TERMINOLOGY REFERENCE
Term Meaning (Simple Definition)
Loop Repeats a block of code multiple times
Function Named reusable block of code that can take inputs and return outputs
List Ordered, mutable collection of items
Tuple Ordered, immutable collection of items
Dictionary Collection of key-value pairs
Set Unordered collection of unique items
Conditional Code that executes based on a true/false condition (if/else)
5. GITHUB TASKS
☐ Create/update folder python-week1-practice/day2
☐ Upload all scripts for Day 2 practice problems
☐ Update README with Day 2 learning summary
6. NOTES / EXAMPLES
(Use this space to write down syntax or logic notes you keep forgetting)
"No noise. Just today’s execution plan."
💪 YOU'VE GOT THIS! Every line of code you write today is building your future. Small progress daily =
massive results. Keep pushing! 🚀