0% found this document useful (0 votes)
4 views

Python 02

Uploaded by

Cloud training
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Python 02

Uploaded by

Cloud training
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

By – Rohit Singh

Features of Python
 Python is a general-purpose, dynamically typed, high-level, compiled and
interpreted, garbage-collected, and purely object-oriented programming language
that supports procedural, object-oriented, and functional programming.
 Easy to use and Read - Python's syntax is clear and easy to read, making it an
ideal language for both beginners and experienced programmers. This simplicity
can lead to faster development and reduce the chances of errors.
 Dynamically Typed - The data types of variables are determined during run-
time. We do not need to specify the data type of a variable during writing codes.
 High-level - High-level language means human readable code.
 Compiled and Interpreted - Python code first gets compiled into bytecode, and
then interpreted line by line. When we download the Python in our system
form org we download the default implement of Python known as CPython.
CPython is considered to be Complied and Interpreted both.
 Garbage Collected - Memory allocation and de-allocation are automatically
managed. Programmers do not specifically need to manage the memory.
 Purely Object-Oriented - It refers to everything as an object, including numbers
and strings
Variable in Python

 A variable is the name given to a memory


location. A value-holding Python variable is
also known as an identifier.
 Variable names must begin with a letter or
an underscore, but they can be a group of
both letters and digits.
 The name of the variable should be written
in lowercase. Both Rahul and rahul are
distinct variables.
Identifier
Naming
 Identifiers are things like variables. An Identifier is utilized to recognize
the literals utilized in the program. The standards to name an identifier
are given underneath.
 The variable's first character must be an underscore or alphabet (_).
 Every one of the characters with the exception of the main person
might be a letter set of lower-case(a-z), capitalized (A-Z), highlight, or
digit (0-9).
 White space and special characters (!, @, #, %, etc.) are not allowed in
the identifier name. ^, &, *).
 Identifier name should not be like any watchword characterized in the
language.
 Names of identifiers are case-sensitive; for instance, my name, and
MyName isn't something very similar.
 Examples of valid identifiers: a123, _n, n_9, etc.
 Examples of invalid identifiers: 1a, n%4, n 9, etc.
Declaring Variable and Assigning
Values
 Python doesn't tie us to pronounce a
variable prior to involving it in the
application. It permits us to make a variable
at the necessary time.
 In Python, we don't have to explicitly declare
variables. The variable is declared
automatically whenever a value is added to
it.
 The equal (=) operator is utilized to assign
worth to a variable.
Data Types in Python
Python keywords
Python Operators
The operator is a symbol that performs a specific operation
between two operands, according to one definition.
Operators serve as the foundation upon which logic is
constructed in a program in a particular programming language.
 Arithmetic operators
 Comparison operators
 Assignment Operators
 Logical Operators
 Bitwise Operators
 Membership Operators
 Identity Operators
 Arithmetic Operators
Arithmetic Python Operators
Comparison Python Operators
Assignment Operators
Assignment Operators

You might also like