The document is an introduction to Python, covering its definition as both a programming and scripting language, its history, and reasons for its creation by Guido van Rossum. It highlights Python's advantages such as portability, ease of use, and its object-oriented nature, along with examples of companies that utilize Python. Additionally, it includes a sample code snippet to illustrate Python's syntax and functionality.
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
7 views
Basics of Python
The document is an introduction to Python, covering its definition as both a programming and scripting language, its history, and reasons for its creation by Guido van Rossum. It highlights Python's advantages such as portability, ease of use, and its object-oriented nature, along with examples of companies that utilize Python. Additionally, it includes a sample code snippet to illustrate Python's syntax and functionality.
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13
INTRODUCTION TO
PYTHON
Presented By- Yash Bhargava
College ID- 20AI044
Presented To- Rahul Sharma Sir
AGENDA- What is Python ? Differences between program and scripting language History Why was python created ? Why do people use Python ? Who uses python today ? A Sample code Enough to understand the code What is Python…? Python is a general purpose programming language that is often applied in scripting roles. So, Python is programming language as well as scripting language. Python is also called as Interpreted language. Differences between program and scripting language- Program Scripting 1.)A program is executed 1.)A script is interpreted. (i.e. the source is first 2.)A "script" is code compiled, and the result written in a scripting of that compilation is language. A scripting expected). language is nothing but 2.)A "program" in general, a type of programming is a sequence of language in which we instructions written so can write code to that a computer can control another perform certain task. Software application. History- 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. Guido Van Rossum is fan of ‘Monty Python’s Flying Circus’, this is a famous TV show in Netherlands. Named after Monty Python . 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 Why do people use Python…? The following primary factors cited by Python users seem to be these: Python is object-oriented- Structure supports such concepts as polymorphism, operation overloading, and multiple inheritance.
Indentation- Indentation is one
of the greatest future in Python. It's portable – 1.)Python runs virtually every major platform used today. 2.)As long as you have a compatible Python interpreter installed, Python programs will run in exactly the same manner, irrespective of platform.
It'sfree (open source)-
Downloading and installing Python is free and easy. Source code is easily accessible. It's easy to use - 1.)No intermediate compile and link steps as in C/ C++ . 2.)Python programs are compiled automatically to an intermediate form called bytecode, which the interpreter then reads.
It's easy to learn –
Structure and syntax are pretty intuitive and easy to grasp. Who uses python today… Python is being applied in real revenue-generating products by real companies. For instance: Google makes extensive use of Python in its web search system, and employs Python’s creator. Intel, Cisco, Seagate, Qualcomm, and IBM use Python for hardware testing. The YouTube video sharing service is largely written in Python. A Sample code- x = 34 - 33 #A comment. y = “Hello” # Another one. z = 3.45 if z == 3.45 or y == “Hello”: x=x+1 y = y + “ World” # String concat. print x Enough to understand the code- Indentation matters to code meaning - Block structure indicated by indentation First assignment to a variable creates it
- Variable types don’t need to be
declared. - Python figures out the variable types on its own. Assignment is = and comparison is == Logical operators are words (and, or, not), not symbols. The basic printing command is print.