140 likes | 159 Views
Python is a high-level programming language sometimes it also denoted as the scripting language as it provides rapid & fast development and easy of use. In python, everything is objected so it can also be named as “object-oriented scripting language”.
E N D
Table of Content: • History • Overview • Language features • Why Python? • Basic Syntax • Data Types • Types of Operator • Multithreaded Programming • Tuples • Conculsion
Overview: • Python is Interpreted • Python is Interactive • Python is Object-Oriented • Python is a Beginner's Language
Language features: • Indentation instead of braces • Several sequence types (i) Strings ’…’: made of characters, immutable (ii) Lists […]: made of anything, mutable (iii) Tuples (…) : made of anything, immutable • Powerful subscripting (slicing) • Functions are independent entities (not all functions are methods) • Exceptions as in Java • Simple object system Iterators (like Java) and generators
Why Python? • Good example of scripting language • “Pythonic” style is very concise • Powerful but unobtrusive object system Every value is an object • Powerful collection and iteration abstractions Dynamic typing makes generics easy
Which Python? Python 2.7 • Current version on Eniac, so we’ll use it • Last stable release before version 3 • Implements some of the new features in version 3, but fully backwards compatible Python 3 • Released a few years ago • Many changes (including incompatible changes) • Much cleaner language in many ways • Strings use Unicode, not ASCII
Basic Syntax: • The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages. • Syntax: $ python Python2.4.3(#1,Nov112010,13:34:43) [GCC 4.1.220080704(RedHat4.1.2-48)] on linux2 Type"help","copyright","credits"or"license"for more information. >>>
Data Types: • Python has various standard data types that are used to define the operations possible on them and the storage method for each of them. • Python has five standard data types − Numbers String List Tuple Dictionary
Types of Operator: • Python language supports the following types of operators. • Arithmetic Operators • Comparison (Relational) Operators • Assignment Operators • Logical Operators • Bitwise Operators • Membership Operators • Identity Operators
Multithreaded Programming: Running several threads is similar to running several different programs concurrently, but with the following benefits − Multiple threads within a process share the same data space with the main thread and can therefore share information or communicate with each other more easily than if they were separate processes. Threads sometimes called light-weight processes and they do not require much memory overhead; they are cheaper than processes.
Tuples: • A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. • The differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples use parentheses, whereas lists use square brackets. • Creating a tuple is as simple as putting different comma-separated values. • Optionally you can put these comma-separated values between parentheses also.
Conculsion: • Since then, Python has emerged as one of the top four or five most widely used programming languages in the world. • As it has grown in popularity, its focus on code quality and readability, and their related impact on developer productivity, seems to have become the more dominant factor behind Python's success.
Thank you https://www.besanttechnologies.com/training-courses/python-training-institute-in-pune