π Weekly Reflection: Phase 2 β Leveling Up with Intermediate Python
This week brought a big change on my route to learning Python: progress from the beginner levels to intermediate. Phase 2 emphasized using my understanding of functions, loops, and conditionals in more formal, efficient, and relevant programming knowledge.
Hereβs how my week unfolded and what I discovered while diving deeper into Python.
π§± Object-Oriented Programming (OOP): Making Code Modular

One of the most powerful concepts I learned this week was Object-Oriented Programming. Creating classes and objects felt like a huge step up in organizing code more efficiently. Instead of writing standalone functions, I started thinking in terms of objects with properties and behaviors.
π What I Practiced:
- Creating a
BillCalculator
class to encapsulate bill-related logic - Using
__init__()
to initialize object data - Adding methods to perform tasks like calculating tax and splitting bills

π‘ Reflection:
Thinking in OOP has made my code cleaner, more readable, and easier to expand. I now see how large-scale applications are built using this structure.
π File Handling: Storing and Retrieving Data
Next up, I explored reading and writing to files. This was my first step into making programs that actually store information, and it was pretty exciting to save data from my calculator into a .txt
file.
π What I Tried:
- Writing total bills and tax details to a file
- Reading from files to display saved logs

π‘ Reflection:
Now I can log user data, which is huge for building apps that track history or require persistence. Iβm also more confident working with file paths and basic I/O errors.
β Error Handling: Writing Safer Code
This week, I also explored how to use try-except
blocks to make sure my programs donβt crash when things go wrongβlike when a user inputs text instead of a number.
π What I Practiced:
- Catching
ValueError
for invalid numeric input - Displaying helpful messages instead of stack traces

π‘ Reflection:
This has made me less afraid of errors. Now, I can handle problems gracefully and provide users with clear feedback, which is key in real applications.
π§ͺ Challenges I Solved This Week
I pushed myself to solve more complex problems by combining what I learned. A few examples:
- Refactored my restaurant bill calculator into an OOP structure
- Logged bill data into a file with automatic tax calculation
- Handled exceptions gracefully to prevent user crashes
π― Next Steps for Phase 3
Heading into Phase 3, I plan to:
- Start building a larger project that uses everything Iβve learned
- Explore automation and web scraping
- Try basic data analysis using
pandas
- Push my skills further with interactive applications (like using Tkinter or Flask)