0% found this document useful (0 votes)
20 views2 pages

A programming language is a formal computer language or constructed language designed to communicate instructions to a machine

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

A programming language is a formal computer language or constructed language designed to communicate instructions to a machine

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

A programming language is a formal computer language or constructed language

designed to communicate instructions to a machine, particularly a computer.


Programming languages can be used to create programs to control the behaviour of a
machine or to express algorithms.
INTRODUCTION OF PYTHON
Python is an object-oriented, high-level language, interpreted, dynamic and multipurpose
programming language
Python is easy to learn yet powerful and versatile scripting language which makes it
attractive for Application Development. Python's syntax and dynamic typing with its
interpreted nature, make it an ideal
language for scripting and rapid application development in many areas Python supports
multiple programming pattern, including object-oriented programming, imperative and
functional programming or procedural styles.
Python is not intended to work on special area such as web programming That is why it is
known as multipurpose because it can be used with web, enterprise, 3D CAD etc.
PYTHON FEATURES
Easy to learn, easy to read and easy to maintain.
Portable: It can run on various hardware platforms and has the she interface on all
platforms.
Extendable: You can add low-level modules to the Python interpreter
Scalable: Python provides a good structure and support for large programs. Python has
support for an interactive mode of testing and debugging
Python has a broad standard library cross-platform.
Everything in Python is an object variables, functions, even code. Every object has an ID,
a type, and a value.
Python Operators
Operators are special symbols in Python that carry out arithmetic or logical computation.
The value that the operator operates on is called the operand. Operators are used to
perform operations on variables and values.
Relational operators
Logical operators
Bitwise operators
Assignment operators
Special operators
➤ Identity operators
➤ Membership operators

Arithmetic operators are used to perform mathematical operations like addition,


subtraction, multiplication, etc
Assignment operators are used to assign values to variables For example, Here's a list
of different assignment operators available in Python.
Python if statement
if statement is the simplest form of decision-making statement. takes an expression and
checks if the expression evaluates to Tree then the block of code in if statement will be
executed If the expression evaluates to False, then the block of code is skipped
Python if-else statement
From the name itself, we get the clue that the if-else statement checks the expression and
executes the if block when the expression is True otherwise it will execute the else block of
code. The else block should be right after if block and it is executed when the expression is
False
Python Nested if statement
In very simple words, Nested if statements is an if statement inside another if statement.
Python allows us to stack any number of statements inside the block of another if
statements. They are useful when we need to make a series of decisions.
Loop Type & Description
While loop:Repeats a statement or group of statements while a given condition is TRUE
It tests the condition before executing the loop body.
For loop:Executes a sequence of statements multiple times and abbreviates the code that
manages the loop variable.
Nested loops:You can use one or more loop inside any another while or for loop
Break Statement:Terminates the loop statement and transfers execution to the
statement Immediately following the loop
Continue Statement:Causes the loop to skip the remainder of its body and
immediately retest ts condition prior to reiterating
Pass Statement:The pass statement in Python is used when a statement is required
syntactically but you do not want any command or code to execute
What is NumPy in Python?
NumPy in Python is a library that is used to work with arrays and was created in 2005 by
Travis Oliphant. NumPy library in Python has functions for working in domain of Fourier
transform, linear algebra, and matrices. Python NumPy is an open-source project that can
be used freely. NumPy stands for Numerical Python
Operations using NumPy Using
NumPy, a developer can perform the following operations- Mathematical and logical
operations on arrays.
Fourier transforms and routines for shape manipulation. Operations related to linear
algebra. NumPy has in-built functions for linear algebra and random number generation.
Sorting:Sorting is to arrange the elements of an array in hierarchical order either
ascending or descending. By default, numpy does sorting in ascending order.

You might also like