PYTHON ABOUT BASICS
WHY PYTHON (.py)?
 Considering other programming languages, python is the most easy and simplest
programming language to be understood by both programmers as well as non-
programmers.
 It has easy syntax similar to simplified pseudo-code as its syntax mostly follows the simple
language to outline the code.
 Python has plenty number of inbuilt libraries that makes easy use of the predefined libraries
by the programmers making the code short and simplified in syntax.
 In addition to the standard libraries, python also has extensive collection of freely available
add-on modules, libraries, tool-kits, etc.
 Python makes the programs more productive and less complex as compared to other
programming languages.
SYNTAX
There are generally 3 parts of a program:
[Input: Processing: Output]
 Input syntax:
name=input()
print(name)
This is the basic syntax used to input data in python.
By default python takes input data as string, therefore if we want to input integers or float values in
python, then we have to use casting method. Generally 3 types of casting is used [int,float,string].
Casting syntax : int(), float(), str().
 Input numbers:
Num=int(input())
Num2=float(input())
 Output syntax:
Print(“hello world”)
USEFUL POPUPS
 If we have to comment a line in python then we use (#) symbol, i.e. we want to write a line
for only our understanding and not to be executed in a program then we comment that
particular word or line.
 This is done in two ways:
 SINGLE LINE COMMENT (#)
 MULTI LINE COMMENT (“”” “””)
 The indentation in Python is very important, it refers to the spaces at the beginning of a
code line. While in other programming languages the indentation in code is for readability
only. Python uses indentation to indicate a block of code.
VARIABLES
Variables are named memory locations where data of a program is stored.
In python variables are created when you assign a value in the code.
DATA TYPES
In python tension of data types is not required, since python is dynamic in nature i.e. at runtime the
interpreter understands datatype according to the value entered.
By default python assumes data entered is of string type.
Data types in python:
Text Type: string
Numeric Types: integer, float, complex
Sequence Types: list, tuple, range
Mapping Type: dictionary
Set Types: set, frozen set
Boolean Type: boolean (true or false)
Binary Types: bytes, byte array, memory view
You can get type of data type by using function: type()
OPERATORS:
 Arithmetic operators
 (+) - (addition)
 (-) - (subtraction)
 (*) - (multiplication)
 (/ )- (division)
 (%) - (Modulus)
 (**) - (Exponentiation)
 (// )- (Floor division)
 Assignment operators
 +=
 -=
 *=
 /=
 %=
 //=
 **=
 &=
 |=
 ^=
 >>=
 <<=
 Comparison operators
 ==
 !=
 >
 <
 >=
 <=
 Logical operators
 and
 or
 not
 Identity operators
 is
 is not
 Membership operators
 in
 not in
 Bitwise operators
 &
 |
 ^
 ~
 <<
 >>
Python  Glimpse

More Related Content

PPT
Input, Processing and Output
PPTX
PPTX
Which is better, Java or Python? And how?
PPTX
Introduction to Python Programming - I
PDF
How To Tame Python
PPTX
Introduction to python
PPTX
Python | What is Python | History of Python | Python Tutorial
PPTX
Program Logic and Design
Input, Processing and Output
Which is better, Java or Python? And how?
Introduction to Python Programming - I
How To Tame Python
Introduction to python
Python | What is Python | History of Python | Python Tutorial
Program Logic and Design

What's hot (20)

PPTX
Types Of Coding Languages: A Complete Guide To Master Programming
PPTX
Presentation on python
PPTX
Benefits & features of python |Advantages & disadvantages of python
PPTX
About Python Programming Language | Benefit of Python
PPTX
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
PDF
Introduction to python programming
PDF
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
PPTX
Python programming introduction
PDF
Python programming
PPTX
Automatic subtitle generation
PDF
Chapter 0 Python Overview (Python Programming Lecture)
PPTX
Python-00 | Introduction and installing
PPTX
What is Python? An overview of Python for science.
PPTX
Python Programming Language
PDF
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
PDF
Fantasy cricket game using python(intershala project)
 
PPT
Introduction to python
PDF
Fundamentals of python
ODP
20120314 changa-python-workshop
PDF
Python lec 1002_for_biologists
Types Of Coding Languages: A Complete Guide To Master Programming
Presentation on python
Benefits & features of python |Advantages & disadvantages of python
About Python Programming Language | Benefit of Python
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Introduction to python programming
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Python programming introduction
Python programming
Automatic subtitle generation
Chapter 0 Python Overview (Python Programming Lecture)
Python-00 | Introduction and installing
What is Python? An overview of Python for science.
Python Programming Language
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Fantasy cricket game using python(intershala project)
 
Introduction to python
Fundamentals of python
20120314 changa-python-workshop
Python lec 1002_for_biologists
Ad

Similar to Python Glimpse (20)

PPTX
PYTHON PROGRAMMING.pptx
PPTX
python_class.pptx
PPTX
BASICS OF PYTHON usefull for the student who would like to learn on their own
PDF
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
PPT
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
PPT
Python - Module 1.ppt
PPTX
Introduction on basic python and it's application
PDF
Python Programming
PDF
Python Programing Bio computing,basic concepts lab,,
PPTX
introduction to python programming concepts
PPTX
Introduction to Programming.pptx ok ok ok
PPTX
2022-23TYBSC(CS)-Python Prog._Chapter-1.pptx
PDF
Python quick guide
PPTX
Python intro
PPTX
20BCT23 – PYTHON PROGRAMMING.pptx
PPTX
INTRODUCTION TO PYTHON.pptx
PPTX
unit (1)INTRODUCTION TO PYTHON course.pptx
PPTX
Python 01.pptx
PPTX
Python Basics
PDF
Python Programming.pdf
PYTHON PROGRAMMING.pptx
python_class.pptx
BASICS OF PYTHON usefull for the student who would like to learn on their own
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
Python - Module 1.ppt
Introduction on basic python and it's application
Python Programming
Python Programing Bio computing,basic concepts lab,,
introduction to python programming concepts
Introduction to Programming.pptx ok ok ok
2022-23TYBSC(CS)-Python Prog._Chapter-1.pptx
Python quick guide
Python intro
20BCT23 – PYTHON PROGRAMMING.pptx
INTRODUCTION TO PYTHON.pptx
unit (1)INTRODUCTION TO PYTHON course.pptx
Python 01.pptx
Python Basics
Python Programming.pdf
Ad

Recently uploaded (20)

PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
DOC
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
PDF
Website Design Services for Small Businesses.pdf
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PDF
MCP Security Tutorial - Beginner to Advanced
PPTX
most interesting chapter in the world ppt
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PPTX
Full-Stack Developer Courses That Actually Land You Jobs
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PPTX
Introduction to Windows Operating System
PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
Airline CRS | Airline CRS Systems | CRS System
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
Practical Indispensable Project Management Tips for Delivering Successful Exp...
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
"Secure File Sharing Solutions on AWS".pptx
How Tridens DevSecOps Ensures Compliance, Security, and Agility
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
Website Design Services for Small Businesses.pdf
Weekly report ppt - harsh dattuprasad patel.pptx
MCP Security Tutorial - Beginner to Advanced
most interesting chapter in the world ppt
Wondershare Recoverit Full Crack New Version (Latest 2025)
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
Topaz Photo AI Crack New Download (Latest 2025)
Full-Stack Developer Courses That Actually Land You Jobs
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
Introduction to Windows Operating System
Trending Python Topics for Data Visualization in 2025
Airline CRS | Airline CRS Systems | CRS System
How to Use SharePoint as an ISO-Compliant Document Management System
Practical Indispensable Project Management Tips for Delivering Successful Exp...
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
"Secure File Sharing Solutions on AWS".pptx

Python Glimpse

  • 1. PYTHON ABOUT BASICS WHY PYTHON (.py)?  Considering other programming languages, python is the most easy and simplest programming language to be understood by both programmers as well as non- programmers.  It has easy syntax similar to simplified pseudo-code as its syntax mostly follows the simple language to outline the code.  Python has plenty number of inbuilt libraries that makes easy use of the predefined libraries by the programmers making the code short and simplified in syntax.  In addition to the standard libraries, python also has extensive collection of freely available add-on modules, libraries, tool-kits, etc.  Python makes the programs more productive and less complex as compared to other programming languages. SYNTAX There are generally 3 parts of a program: [Input: Processing: Output]  Input syntax: name=input() print(name) This is the basic syntax used to input data in python. By default python takes input data as string, therefore if we want to input integers or float values in python, then we have to use casting method. Generally 3 types of casting is used [int,float,string]. Casting syntax : int(), float(), str().  Input numbers: Num=int(input()) Num2=float(input())  Output syntax: Print(“hello world”) USEFUL POPUPS  If we have to comment a line in python then we use (#) symbol, i.e. we want to write a line for only our understanding and not to be executed in a program then we comment that particular word or line.  This is done in two ways:  SINGLE LINE COMMENT (#)
  • 2.  MULTI LINE COMMENT (“”” “””)  The indentation in Python is very important, it refers to the spaces at the beginning of a code line. While in other programming languages the indentation in code is for readability only. Python uses indentation to indicate a block of code. VARIABLES Variables are named memory locations where data of a program is stored. In python variables are created when you assign a value in the code. DATA TYPES In python tension of data types is not required, since python is dynamic in nature i.e. at runtime the interpreter understands datatype according to the value entered. By default python assumes data entered is of string type. Data types in python: Text Type: string Numeric Types: integer, float, complex Sequence Types: list, tuple, range Mapping Type: dictionary Set Types: set, frozen set Boolean Type: boolean (true or false) Binary Types: bytes, byte array, memory view You can get type of data type by using function: type() OPERATORS:  Arithmetic operators  (+) - (addition)  (-) - (subtraction)  (*) - (multiplication)  (/ )- (division)  (%) - (Modulus)  (**) - (Exponentiation)  (// )- (Floor division)
  • 3.  Assignment operators  +=  -=  *=  /=  %=  //=  **=  &=  |=  ^=  >>=  <<=  Comparison operators  ==  !=  >  <  >=  <=  Logical operators  and  or  not  Identity operators  is  is not  Membership operators  in  not in  Bitwise operators  &  |  ^  ~  <<  >>