Introduction to function(s) and Data structure

Module # 3 Assignment

This week’s assignment allowed me to deepen my understanding of Python’s functions and core data structures in a hands-on and rewarding way. I enjoyed writing custom functions with different types of arguments, practicing return values, and exploring how to call functions using loops and keyword inputs. What really stood out to me was the flexibility Python offers when working with lists, especially through slicing and combining data. I also learned that tuples cannot be modified like lists, which helped me better grasp the concept of immutability in programming. One of my biggest “aha” moments came from realizing why subtracting lists directly causes a TypeError. This detail taught me to think critically about how different data types are meant to behave. Overall, I appreciated the creative freedom in the assignment, and it made the coding experience feel less like homework and more like building a small, functional story in Python.

Here are the results from the assignment for this week:


Summary (Module 3 takeaways)

  • Learned how to define and call functions with parameters, default values, *args, and return statements.
  • Gained confidence using loops to pass multiple values through functions.
  • Explored how to structure outputs using clean, readable formatting with print().
  • Practiced creating and manipulating lists, tuples, and slices.
  • Discovered that Python does not support list subtraction using -, and why this raises a TypeError.
  • Reinforced the importance of writing clear, modular code for reuse and readability.

A Coding Tip from Sardys

When in doubt, print it out!
Adding print() With blank lines between sections of your code, not only improves readability, but it also helps you debug and reflect on your logic with a fresh perspective. And remember: tuples don’t like change, but lists? They’re ready for anything!

Do you have any other tips 💡 that you would like to share with me?

Please share it, I am here ready 2 learn ☺️

Leave a comment