
Manipulate Lists in Python
In this lab, you will gain hands-on experience manipulating lists in Python, a fundamental data structure. You will learn to create, access, add, remove, modify, sort, query, and nest lists. By the end, you'll effectively work with lists to manage and process data in your Python programs.
Python

Define Classes and Objects in Python
In this lab, you will learn the fundamental concepts of Object-Oriented Programming (OOP) in Python. We will explore how to define classes, which serve as blueprints for creating objects, and understand the relationship between classes and objects. You will then gain practical experience by creating and using instances of your defined classes. The lab will guide you through initializing objects with the __init__ method to set their initial state and customizing their string representation using the __repr__ method for better debugging and readability.
Python

Errors and Exceptions in Python
In this lab, you will gain a practical understanding of errors and exceptions in Python. We will explore how to identify common syntax errors that prevent code execution, recognize various types of exceptions that occur during runtime, and clearly differentiate between these two fundamental concepts in Python programming. Through hands-on exercises, you will learn to spot and fix issues like incorrect indentation, missing syntax elements, and other common pitfalls, building a solid foundation for writing robust and error-free Python code.
Python

PEP 8 Code Style in Python
In this lab, you will learn how to apply the PEP 8 style guide to your Python code. PEP 8 provides recommendations for writing readable and consistent Python code, covering indentation, line length, spacing, and naming conventions. You will practice implementing guidelines, explore rules, and use autopep8 for automatic formatting.
Python

Understand Class Features in Python
In this lab, you will gain a practical understanding of key object-oriented programming concepts in Python. We will explore encapsulation by working with private attributes and learn how to control access to data within classes. Furthermore, you will implement inheritance to create relationships between classes, including practicing multiple inheritance. The lab will also demonstrate polymorphism, showcasing how objects of different classes can respond to the same method call in different ways. Finally, you will utilize the super() method to effectively manage inheritance relationships.
Python

Manage Dictionaries in Python
In this lab, you will gain hands-on experience managing dictionaries in Python. Dictionaries are essential data structures for storing data in key-value pairs. You will learn how to create and inspect dictionaries, access and modify elements, add and delete elements, and explore dictionary view objects.
Python

Handle Exceptions with try except in Python
In this lab, you will learn how to effectively handle exceptions in Python using the `try...except` statement. We will explore how to catch specific exceptions like `ValueError`, handle multiple exception types, and execute code regardless of whether an exception occurred using `else` and `finally` blocks. You will also learn how to raise custom exceptions to signal specific error conditions in your code. Through hands-on exercises, you will gain practical experience in writing robust and error-tolerant Python programs.
Python

Conditional Statements in Python
In this lab, you will learn how to control the flow of your Python programs using conditional statements. We will begin by understanding the concept of sequential program execution and then introduce conditional logic as a way to enable programs to make decisions. You will implement single, dual, and multi-branch logic using if, if-else, and if-elif-else statements. The lab will also cover nested if statements, the pass statement, and introduce the match-case statement (Python 3.10+). By the end of this lab, you will be able to write Python code that executes different blocks of instructions based on specific conditions.
Python

Handle Input and Output in Python
In this lab, you will learn the fundamental concepts of handling input and output in Python. We will explore how to display information to the console using the print() function, including controlling separators between multiple arguments. Furthermore, you will gain practical experience in obtaining user input from the keyboard, writing data to files, and reading data back from files, covering essential skills for interacting with external data sources in your Python programs.
Python

Documenting Python Functions with Docstrings
In this lab, you will learn the importance of documenting your Python code using docstrings. We will explore how to access existing docstrings for built-in functions using the help() function and the __doc__ attribute. Furthermore, you will gain practical experience in writing your own docstrings for custom functions and verifying their accessibility using the help() function, making your code more understandable and maintainable.
Python

Explore Special Methods in Python Classes
In this lab, you will delve into the fascinating world of Python's special methods, often referred to as "dunder" methods. You will gain a practical understanding of how these methods influence the behavior of your classes and objects, exploring __new__, __del__, __slots__, and __call__.
Python

Import Modules and Packages in Python
In this lab, you will learn how to import and use modules and packages in Python. We will explore Python modules with pydoc, import modules using import, import specific objects with from...import, and understand Python packages. This lab provides hands-on practice for effective code organization and reuse.
Python

NumPy Universal Functions
In this lab, we will explore the basics of NumPy Universal Functions (ufuncs). Ufuncs are functions that operate on ndarrays in an element-by-element fashion, supporting array broadcasting, type casting, and other standard features. We will learn about the different methods of ufuncs, broadcasting rules, type casting rules, and how to override ufunc behavior.
NumPyPython

Understand Decorators in Python
In this lab, you will gain a comprehensive understanding of decorators in Python, a powerful feature for modifying or enhancing functions and methods. We will begin by introducing the fundamental concept of decorators and exploring their basic usage. You will learn to use functools.wraps, explore the property decorator, and differentiate between instance, class, and static methods.
Python

Use Tuples in Python
In this lab, you will gain a comprehensive understanding of tuples in Python. You will learn how to create tuples, access their elements using indexing and slicing, and explore how to modify them through techniques like slicing and concatenation, keeping in mind their immutable nature. Furthermore, you will delve into tuple operators and unpacking, discovering how to efficiently work with tuple data. Finally, you will explore and utilize common built-in tuple functions and methods to perform various operations on tuples.
Python

Character Encoding in Python
In this lab, you will gain a comprehensive understanding of character encoding in Python. We will explore the history and concepts of character encoding, from ASCII to Unicode and UTF-8. You will learn to use ord() and chr(), convert between strings and bytes with encode() and decode(), and handle encoding errors.
Python

Define and Use Functions in Python
In this lab, you will learn how to define and use functions in Python. Functions are essential for organizing code and promoting reusability. You will begin by understanding the concept of functions and exploring Python's built-in functions, learning how to call them with parameters and observe their output. Following the exploration of built-in functions, you will learn how to define your own simple functions. Finally, you will practice calling these user-defined functions to execute the code blocks they contain, solidifying your understanding of function creation and usage in Python.
Python

Add Comments in Python
In this lab, you will learn the importance and practical application of comments in Python programming. Comments are essential for making your code understandable to humans, which is crucial for maintenance and collaboration, especially as programs grow in complexity. You will explore different types of comments and understand how to use them effectively.
Python