Come lets explore python from scratch

Helenjoy
2 min readMay 19, 2023

--

Python for everyone

Python includes a large number of syntactical constructs, standard library functions, and interactive development environment capabilities. Fortunately, you can disregard the majority of that; all you need to do is learn enough to develop some useful tiny programs.
However, before you can do anything, you must first grasp some fundamental programming ideas. You might think these notions are arcane and laborious, like a magician in training, but with sufficient understanding and practice, you’ll be able to command your computer like a magic wand and perform astonishing feats.

>>> 5 + 2

7

>>>

In Python, 2 + 2 is referred to as an expression, which is the most fundamental type of computer instruction in the language. Expressions are made up of values (like 2) and operators (like +), and they can always be evaluated (that is, reduced) to a single value. That is, you can utilise expressions everywhere in Python code where a value could be used.

In the preceding example, 5 + 2 is reduced to a single value, 7.

A single value with no operators is also regarded as an expression, even if it just evaluates to itself, as demonstrated here:

>>> 7

7

Other operators can also be used in Python expressions, For example,

lists all of Python’s math operators.

python operators

Precedence of Math Operators from Highest to Lowest

Example of Operator Operation Evaluates to…

Python math operators’ order of operations (also known as precedence) is similar to that of mathematics. The ** operator is evaluated first, followed by the *, /, //, and% operators (from left to right), and finally by the + and — operators (also from left to right). If you want to override the conventional precedence, you can use brackets. Use any interactive link to execute many examples. see you with next chapter soon.

--

--

Helenjoy

Research aspirant in deep learning based video compression