What is Python?
Python is an interpreted language, which means you can run the program as soon as you make some changes to the file. So that makes fixing program is much quicker than many other languages.
It is an interpreted language and does not need to be compiled like other object-oriented languages.
How python deals with objects?
Python is an object-oriented language, which means everything in the program seems as objects. So, you will not have to declare variables at the beginning of your program (you can do it any time), unlike other programming languages. Also, you do not specify the type of variable (integer, float, bool).
Using Python as a calculator
We can use Python to perform basic mathematics with ease such as + - / * %
for do this open terminal and type 3+3 and you got 6 and like all other calc.
Don't forget this symbol (#) means comment which the program will not execute it and it doesn't hurt at all it's just a comment for you.
Python is an interpreted language, which means you can run the program as soon as you make some changes to the file. So that makes fixing program is much quicker than many other languages.
It is an interpreted language and does not need to be compiled like other object-oriented languages.
How python deals with objects?
Python is an object-oriented language, which means everything in the program seems as objects. So, you will not have to declare variables at the beginning of your program (you can do it any time), unlike other programming languages. Also, you do not specify the type of variable (integer, float, bool).
Using Python as a calculator
We can use Python to perform basic mathematics with ease such as + - / * %
for do this open terminal and type 3+3 and you got 6 and like all other calc.
Don't forget this symbol (#) means comment which the program will not execute it and it doesn't hurt at all it's just a comment for you.
Python enables programs to be written compactly and readably. Programs written
in Python are typically much shorter than equivalent C, C++, or Java programs,
for several reasons:
- the high-level data types allow you to express complex operations in a single statement;
- statement grouping is done by indentation instead of beginning and ending brackets;
- no variable or argument declarations are necessary.
Python is extensible: if you know how to program in C it is easy to add a new
built-in function or module to the interpreter, either to perform critical
operations at maximum speed, or to link Python programs to libraries that may
only be available in binary form (such as a vendor-specific graphics library).
Once you are really hooked, you can link the Python interpreter into an
application written in C and use it as an extension or command language for that
application.
Comments
Post a Comment