Python Lecture Notes PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This document is a lecture on the introduction of Python. It covers various topics, from the overview and features to useful tools.
Full Transcript
Introduction to Python Python Overview Job Trend Per the indeed.com, percentage growth of Python is 500 times more than it’s peer Languages. http://www.indeed.com/jobtrends?q=Perl%2C+.Net%2C+Python%2Cjava&l=&relative=1 Job In B...
Introduction to Python Python Overview Job Trend Per the indeed.com, percentage growth of Python is 500 times more than it’s peer Languages. http://www.indeed.com/jobtrends?q=Perl%2C+.Net%2C+Python%2Cjava&l=&relative=1 Job In Big Data space Source: http://www.forbes.com/sites/louiscolumbus/2014/12/29/where-big-data-jobs-will-be-in- 2015/ What is Python? Python is a high-level programming language which is: Interpreted: Python is processed at runtime by the interpreter.(NEXT SLIDE) Interactive: You can use a Python prompt and interact with the interpreter directly to write your programs. Object-Oriented: Python supports Object-Oriented technique of programming. Beginner’s Language: Python is a great language for the beginner-level programmers and supports the development of a wide range of applications. Interpreters VersusCompilers An INTERPRETER is a A COMPILER is a computer program, computer program that which coverts each transforms code written high-level program in a high-level statement into the programming language machine code. into the machine code. Python Features Easy to learn, easy to read and easy to maintain. Portable: It can run on various hardware platforms and has the same interface on all platforms. Extendable: You can add low-level modules to the Python interpreter. Scalable: Python provides a good structure and support for large programs. Python has support for an interactive mode of testing and debugging. Python has a broad standard library cross-platform. Everything in Python is an object: variables, functions, even code. Every object has an ID, a type, and a value. More Features.. Python provides interfaces to all major commercial databases. Python supports functional and structured programming methods as well as OOP. Python provides very high-level dynamic data types and supports dynamic type checking. Python supports GUI applications Python supports automatic garbage collection. Python can be easily integrated with C, C++, and Java. Why Python Easy to read Python scripts have clear syntax, simple structure and very few protocols to remember before programming. Easy to Maintain Python code is easily to write and debug. Python's success is that its source code is fairly easy-to-maintain. Portable Python can run on a wide variety of Operating systems and platforms and providing the similar interface on all platforms. Broad Standard Libraries Python comes with many prebuilt libraries apx. 21K High Level programming Python is intended to make complex programming simpler. Python deals with memory addresses, garbage collection etc internally. Interactive Python provide an interactive shell to test the things before implementation. It provide the user the direct interface with Python. Database Interfaces Python provides interfaces to all major commercial databases. These interfaces are pretty easy to use. GUI programming Python supports GUI applications and has framework for Web. Interface to tkinter, WXPython, DJango in Python make it. History of Python Python was conceptualized by Guido Van Rossum in the late 1980s. Rossum published the first version of Python code (0.9.0) in February 1991 at the CWI (Centrum Wiskunde & Informatica) in the Netherlands , Amsterdam. Python is derived from ABC programming language, which is a general-purpose programming language that had been developed at the CWI. Rossum chose the name "Python", since he was a big fan of Monty Python's Flying Circus. Python is now maintained by a core development team at the institute, although Rossum still holds a vital role in directing its progress. https://en.wikipedia.org/wiki/Guido_van_Rossum#/media/File:Guido_van_Rossum_OSCON_2006.jpg Python Versions Release dates for the major and minor versions: Python 1.0 - January 1994 Python 1.5 - December 31, 1997 Python 1.6 - September 5, 2000 Python 2.0 - October 16, 2000 Python 2.1 - April 17, 2001 Python 2.2 - December 21, 2001 Python 2.3 - July 29, 2003 Python 2.4 - November 30, 2004 Python 2.5 - September 19, 2006 Python 2.6 - October 1, 2008 Python 2.7 - July 3, 2010 Python Versions Release dates for the major and minor versions: Python 3.0 - December 3, 2008 Python 3.1 - June 27, 2009 Python 3.2 - February 20, 2011 Python 3.3 - September 29, 2012 Python 3.4 - March 16, 2014 Python 3.5 - September 13, 2015 Python 3.6 - December 23, 2016 Python 3.7 – June 27, 2018 Python 3.12.5 - August 6 2024 Key Changes in Python 3.0 In Python 3, we should enclose the exception argument in parentheses. Old: New: In Python 3, we have to use the as keyword now in the handling of exceptions. Old: New: The division of two integers returns a float instead of an integer. "//" can be used to have the "old" behavior. Python vs. Java Code Examples Python vs. Java Hello World Java Python String Operations Java Python Python vs. Java Collections Java Python Python vs. Java Class and Inheritance Java Python Python Useful Tools Useful Tools Python IDEs Vim Eclipse with PyDev Sublime Text Emacs Komodo Edit PyCharm Useful Tools Python Web Frameworks Django Flask Pylons Pyramid TurboGears Web2py Who Uses Python? Organizations Use Python Web Development :Google, Yahoo Games :Battlefield 2, Crystal Space Graphics :Walt Disney Feature Animation, Blender 3D Science :National Weather Service, NASA, Applied Maths Software Development :Nokia, Red Hat, IBM Education :University of California-Irvine, SchoolTool Government :The USA Central Intelligence Agency (CIA) 5 Reasons to choose Python as 1st Language Python is fun. : Python is a relatively efficient language, requiring fewer lines of code to produce results. Python is easy to set up. : Some languages, such as Java or C#, have much higher setup and maintenance overhead. Python is not going away anytime soon. : In fact, Python has become the most frequently used teaching language at major universities. Python is a tool of choice for doing some very big things. : For instance: YouTube, Google, Instagram, Pinterest, Quora, Reddit, Dropbox, Civilization IV, and more. It’s also widely used for penetration testing, data analysis, scientific computing, and more. Python jobs pay well, and python programmers are in high demand. Thank You