Posts

Showing posts from December 4, 2020

Python 2.4 - Points to remember

  Points to remember ·          A Python program file is always saved with “.py” extension. ·          Python programs can be written in either interactive mode or script mode. ·          Interactive mode should be used only for practise. ·          Script mode should be used to write actual Python programs. ·          Python’s command line window and Python’s IDLE window can be used as interactive mode. Python’s IDLE window and any Text Editor can be used as script mode. ·          I recommend Python’s IDLE window to write programs for new learners. ·          Python has a very vast library used to develop variety of applications. ·          Python is an open source programming language and can be downloaded freely from python.org website. ·          Python programs can be executed in three ways – from Python command line, from Python IDLE window and from the system command prompt. ·          Since Python is an open source language, we can modify the code developed

Python 2.3 - Executing Python program

Image
Executing Python program There are three ways to execute Python programs. ·          Using Python’s IDLE window ·          Using Python’s command line window ·          Directly from System prompt The first two methods are called interactive modes where we can type the program one line at a time and the PVM executes it immediately. Remember we can use Python’s IDLE window as script mode too . And the last one is called script mode where we ask the PVM to execute our program after typing the entire program. Note : In interactive mode, one statement is executed at a time. And in script mode, complete program is executed. 1.    Using Python’s IDLE window IDLE (integrated development environment or integrated development and learning environment) is a graphical interface i.e. it provides graphical interface to the user. We can also modify the font face, size etc. in IDLE. To open IDLE, click on start button of your System, search for Python 3.8 and click on IDLE as shown

Python 2.2 - Python libraries/packages

  Python libraries/packages A Python library or a package is a third party software that is provided or contributed by some other persons or companies which will be used to develop variety of applications. Most of the libraries are not provide by Python so we have to download them explicitly. Python has a very large library of packages such as numpy, pandas, matplotlib, tkinter, math, xlrd etc. These packages are required for different purposes. Actually Python is a very short language but it has a vast library of 3 rd party software . For example, if we want to create desktop applications, then we can use one of the available libraries for GUI applications. Tkinter is one of the available GUI libraries. To download these libraries, we can use ‘pip’ command. To do this, open system command prompt and use ‘pip’ command as shown below – C:\> pip install <package name> pip – pip (Python installation of packages) is a program that comes with Python software. It is used to