These exercises are a collection from my first year at Toronto Metropolitan University (formerly Ryerson). The exercises provided an essential platform to test and improve my foundational knowledge of Python programming. They cover a vast array of topics ranging from recursion to Python's built-in modules.
- Tail Recursion: Understanding and implementing functions that call themselves as their last action.
- Non-Tail Recursion: Implementing recursive functions where the function's recursive call isn't the last action performed.
- Conditional Logic: Making use of
if
,elif
, andelse
to control the flow of the program based on certain conditions. - String Manipulation: Operations and techniques to modify, slice, and transform strings.
- Looping: Implementing and controlling loops using
for
andwhile
. - Sequences: Working with lists, tuples, and other sequence types.
- Unittesting: Writing and running tests to ensure code behaves as expected.
- Python Built-ins Module: Leveraging the utility functions and classes available in Python's
builtins
module. - List Comprehensions: Crafting concise and readable ways to create lists.
- Dictionary Comprehensions: Constructing dictionaries in a similar concise manner as list comprehensions.
- Raising Errors: Generating custom exceptions and understanding when and how to raise them.
- Module Level
__name__
Variable: Grasping the importance and usage of the__name__
variable, especially in scripts and modules.
I'd like to express my gratitude to Toronto Metropolitan University for providing these exercises. They have been instrumental in solidifying my grasp on Python programming during my formative stages.