0% found this document useful (0 votes)
43 views

Ashika

Python is an interpreted, object-oriented programming language that is easy to learn and use for rapid application development. It has a large standard library, extensive support for modules and packages which encourages code reuse, and an active community that shares code openly. However, Python can be slower than other languages like C++ and Java. It also lacks some capabilities for web and mobile development requiring additional frameworks.

Uploaded by

Indra K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Ashika

Python is an interpreted, object-oriented programming language that is easy to learn and use for rapid application development. It has a large standard library, extensive support for modules and packages which encourages code reuse, and an active community that shares code openly. However, Python can be slower than other languages like C++ and Java. It also lacks some capabilities for web and mobile development requiring additional frameworks.

Uploaded by

Indra K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

OVERVIEW OF THE PROGRAMMMING LANGUAGE

PYTHON

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.


Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very
attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect
existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore
reduces the cost of program maintenance.

Python supports modules and packages, which encourages program modularity and code reuse. The
Python interpreter and the extensive standard library are available in source or binary form without charge
for all major platforms, and can be freely distributed.

As a popular open source development project, Python has an active supporting community of
contributors and users that also make their software available for other Python developers to use under open
source license terms.

This allows Python users to share and collaborate effectively, benefiting from the solutions others
have already created to common problems, as well as potentially contributing their own solutions to the
common pool.

Windows

Step 1: Download the Python 3 Installer

1. Open a browser window and navigate to the Download page for Windows at python.org.
2. Underneath the heading at the top that says Python Releases for Windows, click on the link for the
Latest Python 3 Release - Python 3.x.x.
3. Scroll to the bottom and select either Windows x86-64 executable installer for 64-bit or Windows
x86 executable installer for 32-bit.

Sidebar: 32-bit or 64-bit Python

Tour Package Management 1


For Windows, you can choose either the 32-bit or 64-bit installer. Here’s what the difference between the
two comes down to:

• If your system has a 32-bit processor, then you should choose the 32-bit installer.
• On a 64-bit system, either installer will actually work for most purposes. The 32-bit version
will generally use less memory, but the 64-bit version performs better for applications with
intensive computation.
• If you’re unsure which version to pick, go with the 64-bit version.

Step 2: Run the Installer

Once you have chosen and downloaded an installer, simply run it by double-clicking on the downloaded
file. A dialog should appear that looks something like this:

Then just click Install Now.

Tour Package Management 2


Advantages of Python Programming Language
The diverse application of the Python language is a result of the combination of features which give
this language an edge over others. Some of the benefits of programming in Python include:

1. Presence of Third Party Modules:

The Python Package Index (PyPI) contains numerous third-party modules that make Python capable
of interacting with most of the other languages and platforms.

2. Extensive Support Libraries:

Python provides a large standard library which includes areas like internet protocols, string
operations, web services tools and operating system interfaces. Many high use programming tasks have
already been scripted into the standard library which reduces length of code to be written significantly.

3. Open Source and Community Development:

Python language is developed under an OSI-approved open source license, which makes it free to
use and distribute, including for commercial purposes.

Further, its development is driven by the community which collaborates for its code through hosting
conferences and mailing lists, and provides for its numerous modules.

4. Learning Ease and Support Available:

Python offers excellent readability and uncluttered simple-to-learn syntax which helps beginners to
utilize this programming language. The code style guidelines, PEP 8, provide a set of rules to facilitate the
formatting of code. Additionally, the wide base of users and active developers has resulted in a rich internet
resource bank to encourage development and the continued adoption of the language.

5. User-friendly Data Structures:

Python has built-in list and dictionary data structures. Further, Python also provides the option of
dynamic high-level data typing which reduces the length of support code that is needed.

Tour Package Management 3


6. Productivity and Speed:

Python has clean object-oriented design, provides enhanced process control capabilities, and
possesses strong integration and text processing capabilities and its own unit testing framework, all of
which contribute to the increase in its speed and productivity. Python is considered a viable option for
building complex multi-protocol network applications.

Python also has a robust standard library, which enables web programmers to accomplish common
programming tasks like web service implementation, string operations, operating system interfaces
management, and working with internet protocols without writing additional code. They can use specific
frameworks to use Python for developing web applications, desktop GUI applications, and scientific and
numeric application and cross-platform mobile apps. But Python, like other programming languages, has
several shortcomings. It’s essential for programmers to know some of the major limitations of Python
programming language.

Limitations of Python Programming Language

1) Performance and Speed

Many studies have proved that Python is slower than other modern programming languages like
Java and C++. So the developers have to frequently explore ways to enhance the Python application’s
speed. However, they have a number of options to make the applications written in Python run faster. For
instance, the developers can create a custom runtime, and use it instead of the default runtime of the
programming language. Likewise, they can rewrite the existing Python code to take advantage of the
existing execution speed.

2) Incompatibility of Two Versions

Beginners often find it pick and learn the right version of Python. Officially, Python 2.x is described
as legacy, whereas Python 3.x is described as current and futuristic. But both versions of the programming
language have been updated on a regular basis.

Tour Package Management 4


3) Application Portability

Python is a high-level programming language. So developers use interpreters to convert Python code
into code understandable by the operating system. They need to install specific version of Python interpreter
on the operating system to run the Python application on that platform. The shortcoming does not allow
programmers to use Python for developing cross-platform applications. Also, they could not port the
application from one platform to another smoothly.

4) Requires Additional Testing

Python is a dynamically typed programming language. It does not require programmers to define the
type of a variable while declaring it. The feature makes it easier for programmers to write code freely. But a
number of critical bugs or defects emerge at the time of compilation as the variable types are not defined
explicitly. So the developers must perform a number of tests additionally to identify and fix the bugs during
runtime.

5) Lacks Web Development Capabilities

Many programmers prefer using Python as a scripting language to build web applications rapidly.
But Python does not come with built-in web development capabilities. Also, the standard implementation of
Python does not boost the web applications’ performance across multiple browsers. That is why, the Python
developers have to use a number of Python web frameworks additionally to effectuate web application
development. However, they have option to choose from several full-stack web frameworks for Python
including Django, TurboGear, web2py, Reahland and Zope2.

6) Weak in Mobile Computing

The steady decline in mobile web usage has made it essential for modern businesses to launch
mobile apps. Often developers have to write mobile apps in a particular programming language according to
the targeted mobile platform. For instance, they need to write iOS app in either Objective-C or Swift.
Likewise, mobile apps for Android need to be written in Java.

Tour Package Management 5


7) Depends on Third-Party Frameworks and Libraries

Python lacks a number of features provided by other modern programming languages. So the
programmers have to use a number of third-party frameworks and tools to build web applications and
mobile apps in Python. However, they need to use open source frameworks and libraries to avoid increasing
project overheads. The cost factor restricts the developers from availing the advanced features and
functionality provided by commercial frameworks.

8) No Option to Embed Block Comments

Nowadays, developers are required to make the application code readable and maintainable. While
writing code, programmers frequently deactivate a specific section or block of code by using block
comments. Unlike other modern programming languages, Python does not support block comments. Hence,
the programmers have to assess the quality of the code either by writing comments for each line of code or
removing a specific section of code at the time of execution. The lack of block comments support requires
programmers to put additional time and effort to assess the quality of Python code.

9) Many Python Modules Lack Adequate Support

Python is supported by a large and active community. The members of the Python community
regularly share new packages or modules to make it easier for programmers to add functionality to the
application. But developers often complain that the quality of individual Python modules or packages
differs. Some of these packages lack adequate support, and are not updated regularly. Hence, the
programmers have to do some initial research to pick the right packages or modules.

10) Does not Provide Prebuilt Statistical Models and Tests

Many developers prefer using Python for developing custom statistical and big data applications.
But developers need to use additional statistical and data analysis packages to write statistical applications
more efficiently. Also, they have to use specific libraries like Pygal, Seaborn and Bokeh to accomplish data
visualization. They cannot make the Python application present and analyze huge volumes of data without
using these libraries and tools.
Tour Package Management 6
On the whole, the developers can use Python to build a variety of software applications rapidly. But
they have to use a number of third-party libraries and frameworks additionally to overcome the limitations
of this high-level programming language. At the same time, they also need to explore ways to enhance the
performance and speed of the Python applications consistently.

Python Syntax compared to other programming languages

• Python was designed for readability, and has some similarities to the English language with
influence from mathematics.
• Python uses new lines to complete a command, as opposed to other programming languages which
often use semicolons or parentheses.
• Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions
and classes. Other programming languages often use curly-brackets for this purpose.

Applications of Python Programming Language

 GUI based desktop applications

 Image processing and graphic design applications

 Scientific and computational applications

 Games

 Web frameworks and web applications

 Enterprise and business applications

 Operating systems

 Language development

 Prototyping

Tour Package Management 7


HARDWARE AND SOFTWARE REQUIREMENTS

HARDWARE REQUIREMENTS:

• PENTIUM processor
• 64-128 MB of RAM
• 40 GB HD
• CD ROM Drive
• Mouse
• Keyboard and Printer
• VGA/SVGA

SOFTWARE REQUIREMENTS:

• Windows XP2007
• Python IDE

Tour Package Management 8


MODULES

1. User Login

This asks for the customer details.

2. Selecting Tourist Places

This displays the tourist places you wish to go.

3. Inquiring Personal Details

This asks your personal details.

4. Payment Details

This asks for bank details that are required for payment.

5. Payment Confirmation

This confirms your payment.

Tour Package Management 9


FLOW DIAGRAM

Start

Displays options

Proceed with the


selected mode of
payment

Display the output

Stop

Tour Package Management 10


SOURCE CODE

print(")--------------------------------------------------------------------(")
print(") NS Holidays (")
print(")--------------------------------------------------------------------(")
a=input("Enter your name:")
print(" ")
b=input("Enter your age:")
print(" ")
while True:
c=input("Enter your contact number:")
if len(c)==10:
break
else:
print("Please enter 10 digit number:")
continue
print(" ")
d=input("Enter your email id:")
print(" ")
print("Thank you for sharing your details")
print(" ")
print("Here are some list of our tourist places that you like to visit")
print(" ")
print(")-----------------------------------------(")
print(") 1.Assam (")
print(") (")
print(") 2.Arunchal pradesh (")
print(") (")
print(") 3.Haryana (")
print(") (")
print(") 4.Manipur (")
print(") (")
print(") 5.Mizoram (")
print(") (")
print(") 6.Delhi (")
print(")-----------------------------------------(")
f=True
while f==True:
e=input("Enter the city you want to visit:")
if e=='1':
print(" ")
print("For 3 Days 2 Nights \n HOTEL:The Greenwood\n PLACES:\n *Liabari\n *Hajo\n
*Kaziranga National Park\n *Silchar\n *Digboi\n *Umananda Island\n TOTAL PACKAGE:25,000")
elif e=='2':
print(" ")

Tour Package Management 11


print("For 3 Days 2 Nights \n HOTEL:Le Atlas\n PLACES:\n *Ziro valley\n *Sela pass\n
*Roing\n *Dirang\n *Nurang falls\n *Sangti\n TOTAL PACKAGE:33,000")
elif e=='3':
print(" ")
print("For 3 Days 2 Nights \n HOTEL:Leela Residency\n *Gurgaon\n *Panchkula\n *Panipat\n
*Karnal\n *Rotak\n *Sultanpur bird sanctuary\n TOTAL PACKAGE:40,000")
elif e=='4':
print(" ")
print("For 3 Days 2 Nights \n HOTEL:Hynat Residency\n *Loktat lake\n *Imphal\n *Keibul
lamjao national park\n *Churachandpur\n TOTAL PACKAGE:43,000")
elif e=='5':
print(" ")
print("For 3 Days 2 Nights \n HOTEL:Roman Lodge\n PLACES *Aizawl\n *Lunglei\n
*Champhai\n *Thenzawl\n *Thenzwal waterfall\n *Kolasib mountain\n TOTAL PACKAGE:22,000")
elif e=='6':
print(" ")
print("For 3 Days 2 Nights \n HOTEL:Classic Rooms\n PLACES *Qutub Minar\n *India Gate\n
*Red fort\n *Humayun Tomb\n *Rashtrapati Bhawan\n TOTAL PACKAGE:50,000")
else:
print(" ")
print("you have chossen an incorrect option, please retry.")
print(" ")
g=input("Do you want to repeat YES/NO :").lower()
if g=='yes':
continue
elif g=='no':
break
else:
print('Invalid please try again')
print('1)For payment\n 2)For inquriy')
print(" ")
h=input("Enter your choice 1 or 2 :")
print(" ")
if h=='1':
j=int(input("Enter the number of person:"))
print(" ")
r=input("Enter your full address (with city):")
print(" ")
s=input("Enter the mode of transportation you prefer (TRAIN or AEROPLANE) :")
print(" ")
i=input("Enter the city number you want to visit from the above list:")
if i=='1':
print("In Assam total package for single person trip for 3 Days 2 Nights is 25,000 and for 6 Days 5
Nights is 36,000 (children under 5 year old is free)")
first=j*4000
first2=j*6500
elif i=='2':
Tour Package Management 12
print("In Arunchal pradesh total package for single person trip for 3 Days 2 Nights is 33,000 and
for 6 Days 5 Nights is 46,000(children under 5 year oid is free)")
firt=j*3700
first2=j*4500
elif i=='3':
print("In Haryana total package for single person trip for 3 Days 2 Nights is 40,000 and for 6 Days
5 Nights is 59,000(children under 5 year old is free)")
first=j*2500
first2=j*3900
elif i=='4':
print("In Manipur total package for single person trip for 3 Days 2 Nights is 43,000 and for 6 Days
5 Nights is 50,000(children under 5 year old is free)")
first=j*3000
first2=j*4600
elif i=='5':
print("In Mizoram total package for single person trip for 3 Days 2 Nights is 22,000 and for 6 Days
5 Nights is 35,000(children under 5 year old is free)")
first=j*4000
first2=j*4500
elif i=='6':
print("In Delhi total package for single person trip for 3 Days 2 Nights is 50,000 and for 6 Days 5
Nights is 67,000(children under 5 year old is free)")
first=j*5000
first2=j*6780
else:
print("please enter correct option")
print(" ")
print("Please enter your card information.")
print(" ")
k=input("Enter card holder name:")
print(" ")
while len(i)<12:
i=input("Enter card number:")
if len(i)!=12:
print("Please enter 12 digit card number")
continue
print(" ")
m=input("Enter Expiry Date (mm/yyyy):")
print(" ")
while True:
n=input("Enter CVV number:")
if len(n)==3:
break
else:
print("Please enter 3 digit CVV number")
continue
print(" ")
Tour Package Management 13
print("Total cost that you will get from",s,"for 3 Days and 2 Nights is",first,"and for 6 Days and 5
Nights is",first2)
print(" ")
p=input("Enter the number of days you want to go in the trip (3 or 6):")
if p=='3':
q=first
elif p=='6':
q=first2
while True:
o=input("Do you want to make payment (yes/no)").lower()
if o=='yes':
print(j,"Number of person are going for",p,"days from",r,"in",s,"for",p,"days with total coast
of Rs",q,)
print("Your transcatiom have been successfully completed")
print("You can enjoy your trip")
else:
print("Thank you for cooperating with us.\n TRAVEL!! Before you run out of time.")
break

Tour Package Management 14


SCREENSHOTS

Tour Package Management 15


Tour Package Management 16
Tour Package Management 17
Tour Package Management 18
Tour Package Management 19
Tour Package Management 20
Tour Package Management 21
BIBLIOGRAPHY

 Computer Science with Python – SUMITA ARORA

 Wikipedia – Google

 Simplelearn – Youtube

 W3schools.com

 Introduction to Python , Dr.Ramesh

Tour Package Management 22

You might also like