The latest version of Python can be freely downloaded from www.python.org which maintained by PSF (Python Software Foundation).
After installation, the default Shell version and Editor versions are available through Python IDLE (Integrated Development and Learning Environment) which is Free IDE. But based on the developer’s purpose, convenient and taste there are different IDE’s available in the internet as we know IDE is a software that facilitates all the requirements of Program Development in a single environment. An IDE enables autocompletion and Auto Suggestion of Code, program elements displaying in different colors for easy identification, using copy and paste we can easily insert the repeating code and using find & replace we can easily navigate through the code and many others.
Different IDEs
- PyCharm: PayCharm is a cross-platform IDE used for Python programming. This editor can be used on Windows, macOS, and Linux. This software contains API that can be used by the developers to write their own Python plugins so that they can extend the basic functionalities.
- Spyder: This software is designed for and by scientists who can integrate with Matplotlib, SciPy, NumPy, Pandas, Cython, IPython, SymPy, and other open-source software. Spyder is available through Anaconda (open-source distribution system) distribution on Windows, macOS, and Linux.
- Sublime Text3: Sublime Text 3 is a code editor which supports many languages including Python. It has basic built-in support for Python. Customization of Sublime Text 3 is available for creating create a full-fledged Python programming environment. The editor supports OS X, Windows, and Linux operating systems.
- Visual Studio Code: Visual Studio Code (VS Code) is an open-source environment developed by Microsoft. This IDE can be used for Python development. Visual Studio Code is based on Electron which is a framework to deploy Node JS applications for the computer running on the Blink browser engine.
- Atom: Atom is a useful code editor tool preferred by programmers due to its simple interface compared to the other editors.
- Jupyter: Jupyter is a tool for people who have just started with data science. It is easy to use, interactive data science IDE across many programming languages that just not work as an editor, but also as an educational tool or presentation.
- PyDev: PyDev is a third-party Python editor for Eclipse. This editor can be used in not only Python but IronPython and Jython development.
- Thonny: Thonny is an IDE for learning and teaching programming, specially designed with the beginner Pythonista scripting environment. It is developed at The University of Tartu, which you can download for free on the Bitbucket repository for Windows, Linux, and Mac.
- Wing: Wing is a lightweight Python environment which is designed to give you productive development experience.
- ActivePython: ActivePython is software consisting of the Python implementation CPython and a set of various extensions to facilitate installation.
Default IDE
Since python is interpreted language, the code lines can be directly entered in the shell environment of Python and check the output. But the Shell environment cannot store instructions is not possible. Hence, if you want to store the python code as a source code file and edit and re-execute it whenever you want you need a text editor environment.
As we learnt, the default shell as well as text editor available in the form of IDLE with python installation which can be used for your program. But developers usually select an IDE according to their project and many other factors. Some of the IDEs are suitable for beginners while some are suitable for senior developers.
Let us run the following basics python programs in the default python IDLE and Thonny IDE which is simple IDE for beginners.
Thonny IDE can be downloaded from Thonny.org website for free.
Basic Python Programs
# program1: prints welcome message on screen
print (“Welcome to Python Programming”)
# program2: print sum of 2 numbers
a=10
b=20
print (“Sum is”,a+b)
# program3: print average of 3 numbers
a=10
b=20
c=30
print (“Average is”,(a+b+c)/3)
# program4: print area of rectangle
l=10
b=20
print (“Area of Rectangle is”,l*b)
# program5: print area of circle
pi=3.147
r=20
print (“Area of Circle is”,pi*r*r)
# program6: print hello message to the user with his name
name=input(“Enter your Name :”)
print (“Hello”,name,”, Welcome to Python”)
# program7: print fullname by adding firstname and lastname
a=input(“Enter your First Name :”)
b=input(“Enter your Last Name :”)
print (“Hello”,a+” “+b,”, How are you?”)
# program8: print sum of user input numbers
a=int(input(“Enter your First Number :”))
b=int(input(“Enter your Second Number :”))
print (“Sum of your numbers is :”,a+b)
“””program9: print sum of input numbers
in different format”””
a=int(input(“Enter your First Number :”))
b=int(input(“Enter your Last Number :”))
print (“{0} + {1} = {2}”.format(a,b,a+b))
”’program10: print sum of input numbers
in different format”’
a=input(“Enter your First Number :”)
b=input(“Enter your Last Number :”)
sum=int(a)+int(b)
print (“{0} + {1} = {2}”.format(a,b,sum))