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

Lecture 0

The document provides an overview of Python programming, highlighting its features, ease of use, and comparisons with other programming languages like Java and C++. It discusses the history of Python, its versions, and the importance of competitive programming for career opportunities in tech. Additionally, it emphasizes Python's simplicity, portability, and object-oriented nature, making it a popular choice among programmers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 0

The document provides an overview of Python programming, highlighting its features, ease of use, and comparisons with other programming languages like Java and C++. It discusses the history of Python, its versions, and the importance of competitive programming for career opportunities in tech. Additionally, it emphasizes Python's simplicity, portability, and object-oriented nature, making it a popular choice among programmers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Python Programming

Programming ..??
Algorithms v/s programming
Algorithm: how to systematically perform a task
Write down as a sequence of steps
“Recipe”, or program
Programming language : describes the steps
What is a step? Degrees of detail
“Arrange the chairs” vs “Make 8 rows with 10
chairs in each row”
Which Programming Language ??
What is Python?

• Python is an open source, object-oriented, high-level powerful


programming language.
• Developed by Guido van Rossum in the early 1989.
“Monty Python's Flying Circus”, a BBC comedy series from the 1970s.
• Python runs on many Unix variants, on the Mac, and on Windows
2000 and later.
YOUTUBE
DROP BOX
SURVEY MONKEY
GOOGLE
QUORA
BITLY
REDDIT
YAHOO MAPS
Your Future ….!!!
Let’s Find Out ….!!

Write a Program using any language you


know to print “ HELLO WORLD “.
Python Is Easy to Use

• C++ Program :
#include <iostream><br>
int main()
{
cout << "Hello World" << endl;
return 0;
}
C Program
#include <stdio.h>
int main(int argc, char ** argv)
{
printf(“Hello, World!\n”);
}
Java Program :
public class Hello
{
public static void main(String argv[])
{
System.out.println(“Hello, World!”);
}
}
Python Program :
• print ( "Hello World")
The programming language Python was conceived
in the

A. 1955
B. 1981
C. 1989
D.1976
COMPARISON WITH JAVA
• Python programs are typically 3-5 times shorter than equivalent Java
programs.

• Python programs are generally expected to run slower than Java


programs.

• Java, on the other hand, can perform an efficient integer or floating


point addition, but requires variable declarations for a and b.
COMPARISON WITH C++
• Python code is often 5-10 times shorter than equivalent C++ code.

• Python uses algorithmic approach unlike C++.

• Python is an interpretable language whereas C++ is a compiled


language.
SALIENT FEATURES
• Simple- Python is a simple language. Reading a good Python program
feels almost like reading English. It allows you to concentrate on the
solution to the problem rather than the syntax i.e. the language itself.

• Easy to Learn-Python is extremely easy to get started with. Python


has an extraordinarily simple syntax.
• Open source : Python is publicly available open source software, any
one can use source code that doesn't cost anything.
• Portable :
High level languages are portable, which means they are able to run
across all major hardware and software platforms with few or no
change in source code. Python is portable and can be used on Linux,
Windows, Macintosh, Solaris, FreeBSD, OS/2, Amiga, AROS, AS/400 and
many more.
• Object-Oriented : Python is a full-featured object-oriented
programming language, with features such as classes, inheritance,
objects, and overloading.
• Python is Interactive :
Python has an interactive console where you get a Python prompt
(command line) and interact with the interpreter directly to write and
test your programs. This is useful for mathematical programming.
• Interpreted : Python programs are interpreted, takes source code as
input, and then compiles (to portable byte-code) each statement and
executes it immediately. No need to compiling or linking
• Extendable : Python is often referred to as a “glue” language, meaning
that it is capable to work in mixed-language environment. The Python
interpreter is easily extended and can add a new built-in function or
modules written in C/C++/Java code.
• Libraries : Databases, web services, networking, numerical packages,
graphical user interfaces, 3D graphics, others.
• Supports :Support from online Python community
VERSIONS OF PYTHON
• 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
VERSIONS OF PYTHON
• 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
DOWNLOADING PYTHON

https://www.anaconda.com/products/individual
Python is
A. Compiled based language
B. Byte code Interpreted based language
Competitive Programming is a sport. Its like
Olympics of the programming.
• Makes you a desirable candidate to major companies:Participation
in the ACM International Collegiate Programming Contest (ACM
ICPC) is a great opportunity to be seen by Apple, Facebook, Google,
IBM and many other authorities in the IT sphere.
• Makes you faster and more focused:In the competition, you must
solve problems in stressful situations and do it up against a deadline
or you will lose. Taking part in competitive programming teaches you
how to be more focused on the task and not only complete it quickly,
but accurately. These skills are highly beneficial for any job, not just in
coding.
Companies

And many more……………


Challenges
• ACM – ICPC
• Google Code Jam
• Topcoder Open
• Google foo bar challenge
• Facebook Hacker cup

You might also like