KevsRobots Learning Platform
By Kevin McAleer, 4 Minutes

Python is a powerful and versatile programming language, suitable for various applications ranging from simple scripts to large-scale software. This lesson introduces Python programming and guides you on installing Python and writing your first program.
This course takes you from your very first line of Python to building small applications. The first half covers the core language: variables, data structures, control flow, files, errors, modules and classes. The second half is a tour of what people do with Python in the real world, from web scraping and charts to machine learning, automation and databases.
Each lesson explains one topic with short examples you can run yourself, and most end with a quick quiz. Your progress and quiz score are saved in your browser and shown in the sidebar.
What you’ll need: a computer running Windows, macOS or Linux (a Raspberry Pi is perfect), and an internet connection to download Python.
Python is one of the most popular programming languages in the world due to its simplicity and readability. It’s used in various fields such as web development, data analysis, AI, and machine learning. Here are some reasons to learn Python:
Before you can start coding in Python, you need to install the Python interpreter on your computer. Follow these steps to install Python:
Already installed?
macOS and Linux (including Raspberry Pi OS) usually come with Python 3. Open a terminal and type
python3 --versionto check.
The next step is to set up your Python development environment. You’ll need a text editor or an Integrated Development Environment (IDE) to write your code. VS Code, PyCharm and Thonny are great options.
Let’s write your first Python program, a classic ‘Hello, World!’ example:
print("Hello, World!")
To run this program:
.py extension, such as hello_world.py.hello_world.py.python hello_world.py and press enter to run the program. On macOS and Linux, use python3 hello_world.py.You should see Hello, World! printed in the terminal.
Change the message to print your own name, then add a second print() line. Each print() starts a new line.
Quick quiz 1 of 2
Which of these prints a message in Python?
print() is Python’s built-in function for showing text. The others come from other languages.Quick quiz 2 of 2
What file extension do Python programs use?
.py.In this lesson, you learned why Python is an essential language to learn, how to install Python, and how to write your first Python program. Great job getting started!
You can use the arrows ← → on your keyboard to navigate between lessons.
Comments