Python Programing Lab(R16) EXERCISE - 1(a)

Aim: 

Running instructions in Interactive interpreter and a Python Script.
Procedure to Install and Run programs in Python: 


                                           In order to install python, Visit https://www.python.org. When we visit the Python for Windows download page, we‟ll immediately see the division. Right at the top, square and center,the repository asks if you want the latest release of Python 2 or Python 3 (2.7.13 and 3.8.0,

respectively) as shown in below Figure.


The version we want depends on our end goal. Here we will install Python 2.7.13. Click on Download Python 2.7.3 then python-2.7.3.msi file will be downloaded.


Run the installer, then a window will be opened as shown below. Select “Install for all users,” and then click “Next”.


After Clicking on “Next”, a window will be opened as shown below. On the directory selection screen, leave the directory as “Python27” and click “Next”.



After Clicking on “Next”, a window will be opened as shown below. On the customization screen, scroll down, click “Add python.exe to Path,” and then select “Will be installed on local hard drive.” then click “Next.”




We don‟t have to make any more decisions after this point. Just click through the wizard to complete the installation. When the installation is finished, set the variable path. After setting up the path, we can confirm the installation by opening up Command Prompt and type the following command as shown below.


                               Now, we can say that Python 2.7.13 is installed on our machine.

Different Ways of Invoking Python:
  • Python GUI
  • Python Commend Line
  • Command prompt from windows

After Clicking on IDLE(Python GUI), a window will be opened as shown below.

Python command line:

Click on start -> all programs -> python 2.7 -> Python (Command line)

After Clicking on Python (command line), a window will be opened as shown below:


Command prompt from windows:

To open Python from Windows command prompt, We need to set path. The procedure to set the path is as followes:
Go to My Computer -> right click and open properties, then a window will be opened as shown below:
Now, Click on Advanced system settings -> Environmental Variables -> system variables and under system variable, click on Path variable and click on Edit. Then, a window will be opened
as follows:

Add python path in variable value and click on OK as followes:

Now Open Command prompt from windows (cmd), and type the command “python” as follows:



No comments

File Uploading in PHP

  File Uploading in PHP PHP allow you to upload any type of a file i.e. image, binary or text files.etc..,PHP has one in built global variab...