What is Python ?
Is a Programming Language
Used for Server-side Web Development
Used for Scripting
Used for Software Development
What can Python do ?
Can connect to database systems which can read and modify the files.
Can be used on server to create web applications.
Can be used to handle big data and perform complex mathematics.
Why Python ?
Works on different platforms (Windows, Mac, Linux ...)
Simple Syntax
Program can be written in fewer lines
Can be treated in Procedural way, Object-oriented way or functional way.
Python Syntax :
Simple and Readable.
Uses new line to complete the command.
Relies on indentation, using whitespace to define the scope.
Scope of the loops, functions and classes are dependent on indentation.
Other Programming languages use curly brackets.
Install Python :
-> Windows
Before installing check in your PC whether Python is installed or not by running the below command in Command Line. ( Go to Windows -> Run -> cmd -> terminal gets open)
-> Mac Or Linux
On Mac open the terminal or on Linux open the Command Line
- If it's not available then go to https://www.python.org/ and download latest version which is available.
My first Python Program
Python is an interpreted programming language.
The program can be written in a text editor and then can be placed those files into python interpreter to be executed.
Python files will be saved as .py.
Program:
Write the below line in any text editor
print("Hello!")
and save that as hello.py
Open Command Line and navigate to the directory where the file is saved and run :