This document provides an overview of the Python programming language and its applications. It begins by defining Python as a clear and powerful object-oriented language. It then lists some of Python's key features, such as its elegant syntax, large standard library, ability to run on multiple platforms, and being free and open source. The document provides a simple "Hello World" example in Python. It also compares short code samples in Python, C++ and Java. The remainder of the document discusses some common applications of Python, including web development, science/engineering, robotics, GUI development, data science, machine learning, computer vision and more. It provides examples of using Python for tasks like web crawling, games development, file management and automation
2. CONTENTS
What is Python?
Features
Hello World :)
More Features
Few comparison of codes in C++, Java and Python.
Applications for Python
Applications of Python
3. What is Python?
Of course, I am not talking about
snake.
Python is a clear and Powerful
object-oriented programming
language, comparable to Perl,
Ruby, Scheme, Java or C#.
4. Features
Uses an elegant syntax, making the programs you write easier to read.
Easy-to-use Language.
Comes with a large standard library that supports many common programming
tasks such as connecting to web, searching text with regular expressions, reading
and modifying files.
Runs anywhere. Including Mac OS, Windows, Linux and Unix.
Free language in two ways: First, it doesn't cost a single penny and second can
be freely modified and redistributed.
6. More Features
Variety of basic data types available: numbers, strings, lists and dictionaries.
Supports OOPs with classes and Multiple Inheritance.
Codes can be grouped into modules and packages.
Modules can be made in C or C++ or any other language.
Has Automatic Memory Management. Frees us from manually allocate and free
memory in your code.
Cheers! Nothing like malloc() or free() that is used in C. Yeah!
8. Hello World
C++
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World!";
return 0;
}
Java
public class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}
Python
print("Hello World")
9. Swap Numbers
C++
#include <iostream>
using namespace std;
int main()
{
int x = 5, y = 10, temp;
temp = x;
x = y;
y = temp;
return 0;
}
Java
class SwapNumbers
{
public static void
main(String args[])
{
int x = 5, y = 5, temp;
temp = x;
x = y;
y = temp;
}
}
Python
x = 5
y = 10
x,y = y,x
10. Printing Pattern
C++
#include<iostream>
using namespace std;
int main()
{
for( int i = 0; i < 5; i++)
{
for( int j = 0; j <=5; j++)
cout << "*";
cout << "n";
}
return 0;
};
Java
public class JavaProgram
{
public static void main(String
args[])
{
int i, j;
for(i=0; i<5; i++)
{
for(j=0; j<=i; j++)
{
System.out.print("*
");
}
System.out.println();
}
}
}
Python
for i in range(0, 5):
for j in range(0, i+1):
print("*", end="")
print()
11. Applications for Python
Web and Internet Development
Frameworks such as Django
Micro Frameworks such as Flask.
Internet Protocols
HTML and XML
E-mail Processing
More Libraries
Requests(a powerful HTTP client library) and BeautifulSoup(a HTML parser that handles
all sort of oddball HTML)
12. Google
Python provides the power behind the most popular search engine in the world – Google. The programming language can
handle the traffic and computing needs of the search engine and its connected apps.
13. Some more Applications for Python
Scientific and Numeric
Scipy (collection of packages for mathematics, science and engineering)
Raspberry pi (used to design Robots)
Pandas (daily analysis and modeling library)
Desktop GUIs
Tk GUI library
Kivy (for writing multi touch applications)
14. Robotics
Raspberry pi can be used as a brain to the robot to perform various actions and to react to the environment and the coding on
a Raspberry pi can be done using python.
15. GUI development
To develop a cross-platform desktop application python can be used. Python has modules Tkinter, PyQt to support it.
16. Applications of Python
Web Crawler
Using library's like BeautifulSoup
Web Development
Using Libraries like Django and Flask
Data Structures and Algorithms
Using Libraries
Plugin
Library
17. Some more Applications of Python
Data Science
Got some knowledge of Machine Learning and AI? You can implement some algos to
build your own.
Networking
Implement some protocols SMTP, FTP, HTTP
Cryptography
Encrypt and decrypt library, something like, RSA, RC4, DES
Computer Vision
18. Computer Vision
You can do interesting things such as Face detection, Color detection using Opencv with python
19. Machine Learning
Python can be used to do cool things such as predicting stocks, fingerprint identification, spam detection etc. using machine learning. Python has
modules scikit-learn, theano, tensorflow to support it. Currently Deep Learning is all the hype and Tensorflow has support for Deep Learning.
20. A few more
Artificial Intelligence
SimpleAI
EasyAI
Games
Pygame, A few are very popular: Pixel Man, Too many Troopers
23. Some Interesting Applications
A great fan of TV Series or Anime? Python can download all this for you
automatically.
Cricket Lover? Need score Updates? Python delivers all that quickly and free. :)
Have a messy collection of folders? Let Python arrange it for you. :)
Get news Updates.
Got many movies, don't know where to start from? Simple solution. Write
a python script to organize movies as per IMDB ratings. (And that’s too in a few
lines of code.)
24. A few more
Bored of the same wallpaper on the background? Ask python to download Bing
images for you. Or download Pics from Instagram.
Create a file Server with just one line of code:
python -m SimpleHTTPServer #default port 8080
Turtle: Python has built in turtle. Enjoy your childhood.