Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary paython introduction

Rating
-
Sold
-
Pages
13
Uploaded on
13-06-2023
Written in
2022/2023

Python is a general interpreted , interactive, object-oriented and high level programming language. It was created by Guido Van Rossum during . Like Perl, Python source code is also available under the GNU General Public License(GPL).

Show more Read less
Institution
Course

Content preview

Python – Introduction
Python is a general-purpose interpreted, interactive, object-oriented, and high-level
programming language. It was created by Guido van Rossum during 1985- 1990. Like Perl,
Python source code is also available under the GNU General Public License (GPL).

Characteristics of Python
Following are important characteristics of Python Programming −
 It supports functional and structured programming methods as well as OOP.
 It can be used as a scripting language or can be compiled to byte-code for building large
applications.
 It provides very high-level dynamic data types and supports dynamic type checking.
 It supports automatic garbage collection.
 It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.

Applications of Python
As mentioned before, Python is one of the most widely used language over the web.
I'm going to list few of them here:
 Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax.
This allows the student to pick up the language quickly.
 Easy-to-read − Python code is more clearly defined and visible to the eyes.
 Easy-to-maintain − Python's source code is fairly easy-to-maintain.
 A broad standard library − Python's bulk of the library is very portable and cross-platform
compatible on UNIX, Windows, and Macintosh.
 Interactive Mode − Python has support for an interactive mode which allows interactive
testing and debugging of snippets of code.
 Portable − Python can run on a wide variety of hardware platforms and has the same
interface on all platforms.
 Extendable − You can add low-level modules to the Python interpreter. These modules
enable programmers to add to or customize their tools to be more efficient.
 Databases − Python provides interfaces to all major commercial databases.
 GUI Programming − Python supports GUI applications that can be created and ported to
many system calls, libraries and windows systems, such as Windows MFC, Macintosh, and
the X Window system of Unix.
 Scalable − Python provides a better structure and support for large programs than shell
scripting.

Python Environment Variables
Here are important environment variables, which can be recognized by Python −

Sr.No. Variable & Description

1
PYTHONPATH
It has a role similar to PATH. This variable tells the Python interpreter where to locate
the module files imported into a program. It should include the Python source library
directory and the directories containing Python source code. PYTHONPATH is
sometimes preset by the Python installer.

2
PYTHONSTARTUP
It contains the path of an initialization file containing Python source code. It is executed
every time you start the interpreter. It is named as .pythonrc.py in Unix and it contains
commands that load utilities or modify PYTHONPATH.

Page 1 of 13

, 3
PYTHONCASEOK
It is used in Windows to instruct Python to find the first case-insensitive match in an
import statement. Set this variable to any value to activate it.

4
PYTHONHOME
It is an alternative module search path. It is usually embedded in the
PYTHONSTARTUP or PYTHONPATH directories to make switching module libraries
easy.

Running Python
There are three different ways to start Python −


Interactive Interpreter
You can start Python from Unix, DOS, or any other system that provides you a
command-line interpreter or shell window.
Enter python the command line.
Start coding right away in the interactive interpreter.
$python # Unix/Linux
or
python% # Unix/Linux
or
C:> python # Windows/DOS


Script from the Command-line
A Python script can be executed at command line by invoking the interpreter on your
application, as in the following −
$python script.py # Unix/Linux

or

python% script.py # Unix/Linux

or

C: >python script.py # Windows/DOS




Python - Basic Syntax

Interactive Mode Programming
Invoking the interpreter without passing a script file as a parameter brings up the
following prompt −

Page 2 of 13

Written for

Course

Document information

Uploaded on
June 13, 2023
Number of pages
13
Written in
2022/2023
Type
SUMMARY

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
ruchikapatidar114

Get to know the seller

Seller avatar
ruchikapatidar114 AIIMS delhi
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions