Python Exercises

Sharpen your Python programming skills through a collection of hands-on exercises and coding challenges. This section provides practical, real-world problems designed to test and improve your understanding of Python concepts. Each exercise offers an opportunity to apply theoretical knowledge to tangible coding tasks, from basic syntax to more advanced topics. Progress through a series of challenges that build in complexity, reinforcing your learning and preparing you for real-world development scenarios.

Print Hello Python

Print Hello Python

Create your first interactive Python program that accepts user input and displays personalized output. Learn fundamental concepts like variables, input/output operations, and string formatting.
ChallengePython
Python Code Comments

Python Code Comments

Code comments can help people understand what the code is for, and good commenting habits are essential for a good developer. In this lab, you can learn how to add comments to the Python language, and several common ways to comment.
LabPython
Python Math and Augmented Assignment

Python Math and Augmented Assignment

In this lab, we'll dive into crucial aspects of Python programming: math operators and augmented assignment operators.
LabPython
NumPy Math Games

NumPy Math Games

In this challenge, you will practice using the NumPy module in Python and work with NumPy arrays to perform common mathematical operations.
ChallengePython
Decision-Making with If Statements

Decision-Making with If Statements

Since choices are often made in work and life, let's play some games with the if statement.
ChallengePython
Classes and Objects

Classes and Objects

In this lab, you will learn about classes and objects in Python. A class is a template for creating objects. An object is an instance of a class.
LabPython
Python Data Structures Fundamentals

Python Data Structures Fundamentals

In this lab, we'll learn data structures in Python, the main contents of the data structures we'll be working with are: lists, tuples, dictionaries, and sets.
LabPython
Python Function Fundamentals

Python Function Fundamentals

In this lab, you will learn how to define and use Python functions. We will start with simple examples and gradually increase the complexity.
LabPython
Python's Conditional Statements

Python's Conditional Statements

In this experiment, we will explore how to use if statements in Python. if statements allow you to execute code only if a certain condition is met. This is a fundamental concept in programming that allows you to control the flow of your program based on different conditions.
LabPython
Exploring IPython's Interactive Computing Features

Exploring IPython's Interactive Computing Features

IPython is a command line interactive shell for Python. It provides some features for interactive computing, such as advanced introspection, rich media, and a powerful history mechanism.
LabPython
Variable Type Conversion

Variable Type Conversion

In this lab, we will learn how to convert variables between different data types in Python. We will start with simple examples and gradually move on to more complex ones.
LabPython
NumPy List Value Statistics

NumPy List Value Statistics

In this challenge, you will create a Python program using the NumPy library to perform various statistical operations on a list of values. The program will contain multiple sub-challenges that will test your knowledge and understanding of NumPy and its capabilities.
ChallengePython
NumPy Einsum for Scientific Computing

NumPy Einsum for Scientific Computing

In scientific computing, it is often necessary to perform various linear algebra operations. NumPy is a popular Python library that provides efficient and convenient tools for performing such operations. One of the most powerful tools in NumPy is einsum, which stands for Einstein Summation.
LabPython
Linear Algebra Solving with NumPy

Linear Algebra Solving with NumPy

In this challenge, you are tasked with writing a Python program that utilizes the NumPy and Linear Algebra libraries to perform matrix inversion. Matrix inversion is a common technique used in linear algebra, and it is useful in many areas of science and engineering.
ChallengePython
NumPy Einsum Function

NumPy Einsum Function

This challenge is designed to test your skills in using Numpy's einsum function, which allows you to perform various operations on multi-dimensional arrays. The challenge consists of several sub-challenges that gradually increase in difficulty.
ChallengePython