You are on page 1of 14

Python

Submitted by:

Mohd Moin (1808210092)


Table of content

• What is Python?

• Difference between program and scripting language.

• History of Python

• Scope of python

• What can I do with python

• Who uses python today

• Why do people use Python?

• Data Type in Python


What is Python?

1 Python is a general purpose programming language that is often


applied in scripting roles.

2 So, Python is programming language as well as scripting language. 

3  Python is also called as Interpreted language


Difference between program and scripting language

Program Scripting

A program is executed (i.e. the source is first A script is interpreted


compiled, and the result of that compilation is
expected)

A program in general is a sequence of instructions A script is code written in a scripting language. A


written so that a computer can perform certain task. scripting language is nothing but a type of
programming language in which we can write code
to control another software application.
History

1 Invented in the Netherlands, early 90s by Guido Van Rossum.

Python was conceived in the late 1980s and its implementation was started in December 1989.
2

3 Python Is open sourced from the beginning.


Why was python created?

"My original motivation for creating Python was the perceived need for a higher level language in the Amoeba
[Operating Systems] project.

I realized that the development of system administration utilities in C was taking too long. Moreover, doing
these things in the Bourne shell wouldn't work for a variety of reasons. ...

So, there was a need for a language that would bridge the gap between C and the shell”

- Guido Van Rossum 7


What can I do with Python?

• System programming
• Graphical User Interface Programming
• Internet Scripting
• Component Integration
• Database programming
• Gaming, Images, XML, Robot and more
Data Type

• Python has many native data types. Here are the important ones:
• Booleans are either True or False.
• Numbers can be integers (1 or 2), float (1.1 or 1.2), fractions (1/2 and 2/3) or even complex numbers.
• Strings are sequences of Unicode characters, e.g. an HTML document
• Bytes and byte array
• Lists
• Tuples
• Dictionary
LIST

• Lists are used to store multiple items in a single variable.


• Lists are created using square brackets.
• List is a collection which is ordered and changeable. Allows duplicate members.
• Example.
• ListSample = [“abc”,32,True,40]
TUPLE

• Tuples are used to store multiple items in a single variable.


• A tuple is a collection which is ordered and unchangeable.
• Tuple allows duplicate members.
• Example
• tupleSample = (“apple”,”banana”,”cherry”)
DICTIONARY

• Dictionaries are used to store data values in key:value pairs.


• Disctionaries are witten with curly brackets, and have keys and values.
• Dictionary is a collection which is ordered and changeable. No duplicate members.
• Example
• dictionarySample = {“fruit”:”apple”,”vegetable”:”brinjal”}
Project Summary (Tic Tac Toe)

• Pygame library is used for rendering graphics on a display window.


• Keyboard, mouse events are captured and trigger a function when the mouse button is
pressed.
• Mouse position is calculate to determine where to draw X or O on the display and check
if the player wins the game or not.
Tic Tac Toe
Thank You

You might also like