Professional Documents
Culture Documents
What Is Python?
What Is Python?
What is Python?
Python is an interpreted, object-oriented, high level
programming language with dynamic semantics. Python is
simple, easy to learn, syntax emphasizes readability and
therefore reduces the cost of program maintenance. Python
supports modules and packages, which encourages program
modularity and code reuse.
Versions of Python
Since 1994, Python has been released in various versions, like
Python 1.x, Python 2.x, Python 3.x.
Primitive Types
Variables
Here you are going to learn about Variables, which are one of
the most fundamental concepts in programming. They are not
specific to python. They exist in pretty much every
programming language out there. We use variables to
temporarily store data in a computer’s memory, that we can use
later.
This code will print the value you assign to ‘name’ variable on
terminal.
3| Page
In the terminal you will see two printed text, first one will be
‘Shahadath’ and the second one will be ‘Shahriar’
4| Page
Notice carefully, our code executed line by line. Let’s see what
happened here. In line 1, we assign a value to our ‘name’
variable. In line 2, we printed the value of our ‘name’ variable. In
line 3, we re-assign the value of our ‘name’ variable. In line 4, we
again printed the value of our ‘name’ variable, which is re-
assigned in line 3.
Variable Names
Now, how can we write perfect variables name so that our code
looks clean. In programming writing a clean, meaningful code is
very important. There’s some naming rules that we can follow
to make our code looks cleaner and meaningful.
camelCase,
PascalCase,
Snake_Case,
Variable in Details
Python allows you to assign values to multiple variables in one
line.
And you can assign the same value to multiple variables in one
line.
To combine both text and a variable, Python uses the ‘+’ (plus)
character.
You can also use the ‘+’ (plus) character to add a variable to
another variable.
9| Page