Your first steps with Python
Understand what Python is, why developers use it, and write your first small program.
What is Python?
Python is a general-purpose programming language known for readable syntax. It is used in web development, automation, data analysis, artificial intelligence and many other fields.
The goal of your first program is not to memorize syntax. It is to understand the basic relationship between an instruction and the result a computer produces.
Your first instruction
The print() function displays information in the terminal:
print("Hello, world!")
When Python runs this instruction, it displays:
Hello, world!
Store information in a variable
A variable gives a value a name so you can use it later:
name = "Dani"
print(name)
Here, name refers to the text value "Dani". Try changing the value and running the program again.
Try it yourself
Write a program that stores your name and your favourite programming language in two variables, then prints both values.
Remember: programming becomes easier when you experiment. Change the code, predict what will happen, run it, and compare the result.