Skip to main content
Informatik.uz

Your first Python program in 10 minutes

Install Python, write your first program and get to know variables. A step-by-step guide.

1 min read
Your first Python program in 10 minutes — cover
Contents

Python is one of the easiest programming languages to learn. Below we walk through the path to writing your first program.

Step 1: Install Python

Download the latest version from the official python.org website. During installation, enable the Add Python to PATH option.

Step 2: Your first program

salom.py
1print('Salom, dunyo!')

Save the file and run the python salom.py command in the terminal.

Step 3: Variables

tanishuv.py
1ism = input('Ismingiz: ')
2yosh = int(input('Yoshingiz: '))
3
4print(f'Salom, {ism}! Keyingi yil siz {yosh + 1} yoshda bo‘lasiz.')

Congratulations! You have used data input, variables and formatted output.

Next steps

  • Conditional statements (if/else)
  • Loops (for, while)
  • Functions

Enjoyed this article? Share it

Keep reading

EducationProgramming

What is an algorithm and why does it matter?

An algorithm is a precise, step-by-step set of instructions for solving a problem. We explain it with everyday examples and your first code.

1 min read