Featured Article

Master Python For Beginners: Fun Exercises

Evelyn Jul 13, 2026

Embarking on your Python programming journey is an exciting venture, and we're here to support you with some engaging and practical exercises, perfect for absolute beginners. Python's readability and simplicity make it an excellent first language, and these exercises will help you grasp fundamental concepts and foster a love for coding.

Python Practice Exercises for Beginners
Python Practice Exercises for Beginners

Python is extensively used across various fields, including data analysis, machine learning, web development, and more. Getting started with these exercises will not only familiarize you with Python's syntax but also introduce you to several real-world applications. So, let's dive in and start coding!

Master programming with the "python programming third edition" A book that is sure to guide you all
Master programming with the "python programming third edition" A book that is sure to guide you all

Python Basics: Hello World and Variables

Kickstart your Python adventure by learning to print 'Hello, World!' and store data in variables. These are fundamental concepts that form the building blocks of any programming language.

Python list exercises guide
Python list exercises guide

Before diving into the exercises, ensure you have Python installed on your computer. You can download it from the official website: Python Downloads.

Exercise 1: Printing 'Hello, World!'

Python Notes for Beginners (Easy + Quick Guide)
Python Notes for Beginners (Easy + Quick Guide)

Your first exercise is to write a simple Python program that prints the phrase 'Hello, World!' on the screen.

Here's a hint to get you started: ```python print("Hello, World!") ```

Exercise 2: Storing Data in Variables

Python Programming Practice Questions Cheat Sheet 🐍
Python Programming Practice Questions Cheat Sheet 🐍

In this exercise, you'll learn how to store data in variables and manipulate it. Create two variables, `name` and `age`. Assign your name and age to these variables and then print statements that display your name, age, and a greeting message like "Hello, [Name]! You are [Age] years old."

Here's a hint to guide you: ```python name = "Your Name" age = 20 print("Hello,", name, "!", "You are", age, "years old.") ```

Data Types and Basic Operators

Python Practice Exercises for Beginners
Python Practice Exercises for Beginners

Now that you're familiar with variables and printing statements, it's time to explore Python's basic data types and operators. Python has several built-in data types, including integers, floats, strings, booleans, and more. You'll also learn about various operators like addition (+), subtraction (-), multiplication (*), and division (/).

Exercise 3: Data Types and Variables

Python Cheat Sheet for Beginners
Python Cheat Sheet for Beginners
Learn Python in 10 days
Learn Python in 10 days
Python Cheat Sheet for Beginners 🐍
Python Cheat Sheet for Beginners 🐍
Python Beginner Roadmap 2026: Learn Python Step-by-Step From Zero to Job Ready
Python Beginner Roadmap 2026: Learn Python Step-by-Step From Zero to Job Ready
a book cover with the title python file 10 exercises
a book cover with the title python file 10 exercises
Python Learning Path for Beginners 2026 🚀
Python Learning Path for Beginners 2026 🚀
Python list exercises guide
Python list exercises guide
a poster with the words python programming written in yellow and blue, on top of a computer
a poster with the words python programming written in yellow and blue, on top of a computer

Create variables with different data types and print them along with their respective types. This exercise will help you understand the difference between int, float, str, and bool data types.

Here's a hint to help you: ```python x = 10 print(type(x)) ```

Exercise 4: Basic Operators

Write a Python program that uses basic operators to perform the following tasks:

  • Add two numbers and store the result in a variable
  • Subtract one number from another and store the result
  • Multiply two numbers and store the result
  • Divide one number by another and store the result

Finally, print the results using the `print()` function.

Control Flow: If-Else Statements and Loops

Understanding control flow is crucial in programming. In this section, you'll learn about conditional statements and loops, which allow your programs to make decisions and repeat actions.

Exercise 5: If-Else Statements

Write a Python program that takes a user's age as input and prints "You can vote!" if the person is 18 years or older, and "You cannot vote yet!" otherwise.

Here's a hint to guide you: ```python age = int(input("Enter your age: ")) ```

Exercise 6: For Loop

In this exercise, you'll learn about a common type of loop in Python: the 'for' loop. Write a program that prints numbers from 1 to 10 using a for loop.

Here's a hint to help you: ```python for i in range(1, 11): print(i) ```

Congratulations on completing these beginner-friendly exercises! You've truly taken your first steps into the world of Python programming. Continue practicing and exploring to build a strong foundation for your coding journey. Happy coding!