Victor Jeman Academy
Python Fundamentals8 min

Meet Python

Discover what Python is, why it is popular, and write your first program.

What You'll Learn

  • Understand what Python is and why it is one of the most popular languages
  • Write and run your first Python program in the browser
  • Use print() to show text and numbers, and join text with + (concatenation)
  • Leave notes for yourself with

Python is a programming language: a way to tell the computer what to do. You are learning it because by the end of this lesson you will have written your first real program, today, not after ten tutorials.

Think of it like the moment in an RPG when you unlock a new ability. Areas you used to skip open up, puzzles you used to walk past become solvable. Python is that ability, except the world it changes is the real one.

Most languages look like a recipe written in hieroglyphs. Python looks almost like a normal English sentence, which is exactly why it is a good first one to learn.

Across this course you build Python Kingdom, a text RPG where your hero crosses 9 lands to defeat the Dark Bug. Each lesson adds one feature. Today you write the title screen and the hero's opening lines, using two tools: the print() function and comments.

What is Python, really?

Python was created in 1991 by a Dutch programmer named Guido van Rossum. The name has nothing to do with the snake. Guido was a fan of the British comedy group Monty Python and named the language after them.

His idea was simple: build a language people could read easily, not just computers. It worked. Today millions of people use Python, from students in their first lesson to engineers at the biggest tech companies.

Why learn Python specifically?

There are hundreds of programming languages. Here is why this one is a good place to start:

  • It reads almost like English, so you spend your energy on the idea, not on weird symbols.
  • It does almost anything: games, web apps, data analysis, artificial intelligence.
  • It has a huge community. When you get stuck, someone has usually hit the same wall and posted the fix.
  • Companies pay for it. Python on your skill list opens real doors later.

What can you build with Python?

Ce poti construi cu Python?

A few concrete examples:

  • Games - you can build 2D games with a library called Pygame. Not Fortnite, but a Snake game or an interactive quiz is well within reach.
  • Websites - many popular websites and web apps were initially built with Python, using a framework called Django.
  • Artificial intelligence - chatbots, image recognition, weather predictions - many of these are built with Python.
  • Automation - have a boring task you repeat daily on your computer? Python can do it for you in seconds.
  • Data analysis - if you want to discover patterns in large datasets, Python is the number one tool.

How to run Python

The fastest start is an online editor in your browser, with nothing to install. I recommend repl.it. Create a free account, pick "Python" as the language, and you can write code immediately.

Later, when you want to work on your own machine, download Python from python.org and use an editor like Visual Studio Code. For this lesson, repl.it is more than enough.

Your first program: Hello, World!

Anatomia lui print()
print
(
"
Hello, World!
"
)

There is a tradition in programming: the first thing you write in a new language displays the message "Hello, World!" on screen. It is the greeting you give the programming world. Let's keep the tradition:

That is it. One line. When you run it, the screen shows:

text
Hello, World!

The print() function is the workhorse here. A function is a ready-made tool with a name that does a job for you. You call it (run it) by writing its name followed by round brackets (), and whatever you put inside the () is what you hand it to work on. Here you hand print some text between quotes, and it writes that text to the screen. You will use it in every lesson from now on. (You will write your own functions much later; for now you just use the ones Python already gives you.)

Play around with print()

You can hand print() any message you want, one call per line:

Each print() displays its text on a new line. So the result would be:

text
Hi, I am a 9th grade student!
I like to play Minecraft.
Today I am learning Python!

A piece of text in quotes is called a string (you will see the word everywhere from now on). You can glue two strings together with the + operator, a symbol that performs an action, here joining text instead of adding numbers. Joining strings this way is called concatenation, a fancy word for "sticking strings end to end":

Concatenare cu +
""
+
""
Rezultat: "My name is Alex"

Will display:

text
My name is Alex

Watch the space after "is ". Drop it and the two pieces collide into "My name isAlex". Python joins exactly what you give it, spaces included, so the spacing is your job.

You can also hand print() a number, with no quotes:

Will display 15, because Python calculates the result before displaying it.

Comments - notes to yourself

Cum Python citeste codul
1# Afisez un mesaj de bun venit
2print("Bine ai venit!")
3print(3 * 7) # ani de pisica
4# Gata, programul s-a terminat

Sometimes you want to leave a note in your code, to explain why you did something a certain way, for yourself or for whoever reads it next. That is what comments are for: lines Python skips when it runs the program.

A comment starts with the # symbol (called hash or pound). Everything after # on that line is ignored:

Think of comments as sticky notes in your notebook. The computer ignores them, but future-you will be grateful when you open this code in a week and cannot remember what you were building.

A good habit is to write short and clear comments. You do not need to comment every line, just the parts that might be confusing.

Python is a programming language created by Guido van Rossum, easy to read and good for almost anything from games to data analysis. The print() function lets you display text and numbers on screen. Comments start with # and are ignored by the program. You use them as notes to yourself.

Exercise : Countdown to launch

Write a program that counts down from 5 to 1, then prints "Liftoff!". Each number on its own line. Add a comment at the top explaining what the program does. This is pure print() practice, one call per line.

Exercise : The hero's message

The game's hero needs to introduce themselves. Use print() and concatenation with + to show a welcome message on three lines: "Welcome, traveler!", then "You are the last hero of Python Kingdom.", then "Your mission: defeat Dark Bug!". Use + to join at least one of the lines.

Exercise : The title screen of Python Kingdom

Optional stretch, skip if you just want the basics. Aligning the box by hand is fiddly; the concept (one print() per line) is the same as the exercises above.

Create the title screen for "Python Kingdom". Frame the title inside a border made of # characters, with the subtitle "The Curse of Dark Bug" below it. Use one print() per line and add a comment explaining the program.

Hint for the border: here # is just a normal character inside a string, nothing to do with comments. Same key, different job. The top and bottom edges are a single print() with many # in a row, like print("##########"). The middle lines start and end with "#" and pad the space between with blanks so every line is the same width.

Complete game code: Python Kingdom

You built the first piece of Python Kingdom. Copy the code below into a .py file and run it to see the full title screen:

Right now the hero's name and stats are baked straight into your print() lines. Want to change the hero's name? You'd hunt down every line and retype it. Next lesson you fix that with variables: labelled boxes that hold a value once so you can reuse it everywhere, do math on it, and let the program make decisions. That is where Python Kingdom starts to feel like a real game.

Test Your Knowledge

Check how well you understood the lesson with these 5 questions.

Question 1 of 5

Who created the Python language?