INTERACTIVE ONLINE COURSE

Python 3

FOR BEGINNERS


"The first Python course that simply amazed me. Very well explained and easy to understand." (Alexandru Cosmin)

"The best Python course in Romania." (Iulian Geană)

ALL REVIEWS
LESSON 1
PAGE 1 / 3
Working in Python 3
Home >>> Online Lessons, Python 3

First commands

Python is an interpreted language, meaning it executes code line by line, unlike Pascal or C/C++, which require a compiler to generate an executable file. The console allows us to execute one Python command at a time and immediately see the effect. The current position is indicated by the three characters ">>" and the cursor ("|").

The simplest commands display a text or the result of arithmetic operations.

EXERCISE 1

Enter the command print("Hello, Python!") and then press the Enter key. Pay attention to the quotation marks!
EXERCISE 2

Arithmetic calculations? Nothing simpler! We can write them directly in the Python console. Enter the exactly command 2+3*5-1 and then press the Enter key.

Is the console sufficient?

The working mode directly in the console (called the "Python Interactive Console") is interesting and different from what you might be used to. However, we still need programs that contain multiple lines of code, written and executed together to obtain results from calculations or elaborate algorithms.

The console is useful when we need quick access to Python or want to test certain commands. On the next page, we will write our first programs!

Solve both exercises before proceeding. Each contains important feedback!
 home   list  CONTENTS   perm_identity   arrow_upward