0% found this document useful (0 votes)
6 views16 pages

Python Installation and Usage Guide

11th python
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views16 pages

Python Installation and Usage Guide

11th python
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Python Introduction

It is widely used general purpose, high level programming


language. Developed by Guido van Rossum in 1991.

It is used for:
software development,
web development (server-side),
system scripting,
Mathematics.
Features of Python

1. Easy to use – Due to simple syntax rule


2. Interpreted language – Code execution &
interpretation line by line
3. Cross-platform language – It can run on windows,
Linux, Macintosh etc. equally
4. Expressive language – Less code to be written as it
itself express the purpose of the code.
5. Completeness – Support wide rage of library
6. Free & Open Source – Can be downloaded freely
and source code can be modify for
improvement
Shortcomings of Python

1. Lesser libraries – as compared to other


programming languages like c++,java,. Net
2. Slow language – as it is interpreted languages, it
executes the program slowly.
3. Weak on Type-binding – It not pin point on use of a
single variable for different data type.
Installing Python

Two Steps Only –

1. Download Python distribution


2. Python installation process
Installing Python

1. Download Python distribution


You can download python distribution from the link given below
[Link]

Note – Download only that python distribution/MSI Installer, which is best suited for
the Operating system on which you want to install it.
Installing Python

2. Python installation process


1. Double-click the icon labeling the file <version>.exe
Popup window will appear

Click on Run option


Visit : [Link] for regular updates
Installing Python

2. Setup popup window will appear

If the Python Installer finds an earlier version of Python installed on your computer,
the Install Now message will instead appear as Upgrade Now(and the checkboxes will
not appear).
Highlight the install now (or Upgrade now) message and click it.
Installing Python

3. User Account Control pop-up window will appear

Click the Yes button.


Installing Python

4. A new Python <version> Setup pop-up window will appear


with a Setup Progress message and a progress bar.
Installing Python

5. Soon, a new Python <version> Setup pop-up window will


appear with a Setup was successfully message

Click the close button


How to work in Python

PROCESS OF WRITING PROGRAM


After installation of python ,we can work on it in following ways

(i) in Interactive mode


(ii) in Script mode
How to work in Python

(i) in Interactive mode


* Search the [Link] file in the drive in which it is
installed.
If found double click it to start python in interactive
mode
How to work in Python

* Click start button -> All programs


-
> python<version>->IDLE(Python GUI)
How to work in Python
Python command
prompt >>>

Type the following at prompt


print “hello”
print 8*3
print 3**3
k=3+4*3
print k
How to work in Python

(ii) in Script mode


Step 1 (Create program file) / Hello world program
Below steps are for simple hello world program

a. Click Start button->All Programs ->


Python<version>->IDLE
[Link] click File->New in IDLE Python Shell
Now type
print (“hello”)
print (“world”)
print (“python
is”,”object
oriented
programming
lang.”)
How to work in Python

(ii) in Script mode


Step 2 (Run program file)
a. Click Open command from IDLE’s File menu and select the file
you have already saved
b. Click Run-> Run Module
c. It will execute all the commands of program file and display
output in separate python shell window
Note :- Python comes in 2 flavors – python 2.x and python 3.x . Later
one is Backward incompatible language as decide by Python
Software foundation(PSF). Mean code written in 2.x will not execute
on 3.x . Visit the below link for difference between 2.x & 3.x

Common questions

Powered by AI

Python's status as a free and open-source language fosters a large, active community that contributes to its development, resulting in a wealth of resources, tools, and improvements over time. This community involvement enhances the robustness and versatility of Python, making it adaptable to a wide range of development needs .

Python's weak type-binding allows for more flexibility in coding since a variable can hold different data types during its lifecycle. This, however, can lead to potential runtime errors if a programmer misunderstands the data type expected by a function or operation, making careful management necessary .

Python's expressive syntax allows developers to write less code to accomplish tasks, which enhances code readability and maintainability. This not only reduces development time but also minimizes the potential for errors, benefiting both individual programmers and teams working on collaborative projects .

Python's cross-platform capability allows developers to write code that runs on various operating systems such as Windows, Linux, and Macintosh without modification. This enables greater flexibility and efficiency in developing multi-platform software solutions, reducing the need for platform-specific coding .

Running Python in interactive mode is beneficial for testing and debugging small code snippets quickly, while script mode is better suited for developing complete programs. This flexibility allows developers to efficiently leverage Python for both quick, experimental coding and larger, more structured projects .

Python's interpreted nature means that code is executed line by line which can result in slower performance compared to compiled languages like C++ where the code is compiled into machine-level code before execution. This process can make Python less suitable for applications requiring high performance computational power .

Installing Python involves downloading the appropriate distribution for the operating system and running the installer. Selecting the correct version is crucial to ensure compatibility with the system's architecture and any existing Python programs or dependencies, as different Python versions might have incompatibilities .

Python's extensive standard library supports broader software development efforts by providing modules and functions for various tasks like file I/O, internet protocols, and data manipulation. This reduces the need for external libraries and third-party modules, streamlining development and reducing dependencies that may not be as maintained or reliable .

The simplicity of Python's syntax can be particularly advantageous for beginners because it reduces the learning curve, making it easier to focus on programming concepts rather than complex syntax rules. This simplicity allows new learners to quickly start writing functional code, which can encourage continued learning and exploration .

When choosing between Python 2.x and Python 3.x, it's important to consider that Python 3.x is not backward compatible, meaning code written for 2.x will not automatically work in 3.x. Given that Python 3.x is the current standard and continues to receive official support and new features, it's generally recommended for new projects unless specific dependencies require Python 2.x .

You might also like