Uploaded on Jun 3, 2023
Sidhi Trainings offer a unique opportunity for individuals seeking to accelerate their careers by learning trending and advanced software. Our courses are designed to provide comprehensive instruction in the latest technologies, covering everything from fundamentals to advanced concepts.
Best Cloud courses training in Hyderabad
PYTHO
H T T P S : / / S I D H I T R A I N I N G S . C O M /
N
WHAT IS
PYTHON
The popular high-level
programming language Python is
used in a variety of applications.
Python's straightforward
syntax makes it a simple
language to learn.
Python may be used for
straightforward tasks like
graphing or more difficult ones
like machine learning.
VARIABLES, OBJ ECTS, &
CLASSES
Variable
A variable is a pointer to a value kept in the memory
of a computer.
A variety of categories (or data types) can be used
to group variables, including integers (int, float, etc.),
Boolean values (true/false), and sequences (strings,
lists, etc.).
Object
An object is a group of manipulatable data from a
computer's memory.
Despite the fact that certain objects might be defined by
data referred to by numerous variables, ALL VARIABLES ARE
OBJECTS.
The actions taken on or changes made to an
object's data are called methods. They explain
what an object can "do."
VARIABLES, OBJ ECTS, &
CLASSES
Class
A class is a group of objects that all use the
same variables and functions.
All of the objects ( instances) that make up the class
have a blueprint in the definition of the class.
The same variables (colour, size, shape, etc.) may be
present in several instances, but they do not all have
the same values (blue/red/pink, small/large,
square/circular, etc.).
BASIC SYNTAX
RULES
Your variable's name (myInt, etc.) is positioned to the left of the
"=" operator.
The majority of variable names are in camel case, which starts
with a lowercase letter for the first word and capitalises any
following terms. In snake case, all words are lowercase and there
are underscores between them, variable names can also occur.
The variable name is set equal to the memory address where
your value is stored via the assignment operator ("=").
The "Hello, World" variable value is positioned to the right of the
"=" operator.
This value's type need not be specified, but its format must
adhere to a certain object type (as illustrated).
BASIC SYNTAX
RFuUncLtiEonS Syntax
When you use the def... keyword, you are declaring a new
function. The name of your function is referred to by function().
This term is often written in lowercase and designates a verb
or action.
The terms "parameters" (i.e., "values" or "variables") that can be
used within the definitional expressions of your function are "a"
and "b." An empty parenthesis ( ) is used if your function has no
parameters.
An optional statement called "return" will send a value from
your function back to the original call.
BASIC SYNTAX
RCaUlliLngE aS function
Use the function's name (function()) to invoke it, followed by
any required parameters (1, 2) enclosed in parentheses and
separated by commas. : function(1, 2) ; myValue
You have the option of setting your function call's argument equal
to a variable (myValue). Your variable name will be set to the
function's return value.
COMMON DATA TYPES AND
OPERATORS BUSINESS
A data type is a way to categorise a value and specify
the actions that may be carried out on it. An object's
data type is universal.
Operators are symbols that perform certain tasks or
calculations.
Thank
You
Comments