Python
Python
Python is one of the most popular and fastest growing programming languages in
the world.
It's used for all sorts of tasks, including web programming and data analysis, and it
has emerged as the language to learn for machine learning.
The above-mentioned reasons are why it might be a good idea for you to learn how
to program in Python.
Why Python?
• Python has a simple, easy to learn syntax, which emphasizes readability.
Applications written in Python can run on almost any computer,
including those running Windows, macOS, and popular distributions of
Linux. Furthermore, the ecosystem contains a rich set of development
tools for writing, debugging, and publishing Python applications.
• Python because of its rich and easy to understand syntax and the
wide range of open-source packages available. Packages are shared
code libraries that are freely available for anyone to use.
Why Python?
• Network Programming
• Gaming Applications
• Business Applications.
Script mode: In script mode, you put a set of Python statements into a text file with a .py
extension. You then run the python interpreter and point it at the file. The program is executed line
by line, and the output is displayed. There's no compilation step, as shown in the following diagram :
Different ways to Execute Python
Code
Interactive mode: In this mode, each command you type is interpreted and executed immediately,
and you see the results each time you press ENTER. The interactive mode is the default mode if you
don't pass a filename to the interpreter.
Script mode: In script mode, you put a set of Python statements into a text file with a .py
extension. You then run the python interpreter and point it at the file. The program is executed line
by line, and the output is displayed. There's no compilation step, as shown in the following diagram :
It will check line by line and execute. It will check whole program at a time
It gives the results line by line It gives whole output at a time
If any error occurs interpreter stops. It checks all statements in the
Hence it shows only one error program and show all errors in
program
It will not generate executable file If no errors in the program, then it
generates executable file
It always execute only source code. It executes exe file.
Ex HTML, PERL, Javascript, Python EX. C,C++,C#, JAVA
Steps to install Python for Windows
• Go to Google
• Click on Python.org