You are on page 1of 2

21BCM027 KAVISH SHAH

PROBABILITY AND STATISTICS


PRACTICAL 1
Q - Basics of Python
Python is an interpreted, high-level, general-purpose programming
language.

Created by Guido van Rossum and rst released in 1991.

Python was conceived in the late 1980s as a successor to the ABC


language and Modula-3. Python's name is derived from the British
comedy group Monty Python, whom Python creator Guido van
Rossum enjoyed while developing the language.

Its language constructs and object-oriented approach aim to help


programmers write clear, logical code for small and large-scale
projects.

Python uses duck typing and has typed objects but un-typed
variable names.

Despite being dynamically typed, Python is strongly typed,


forbidding operations that are not well-de ned (for example,
adding a number to a string) rather than silently attempting to make
sense of them.

Python has consistently ranked in the top ten most popular


programming languages in the TIOBE Programming Community
Index where, as of December 2018, it is the third most popular
language behind Java, and C.

It was selected Programming Language of the Year in 2007, 2010,


and 2018.

Large organizations that use Python include Wikipedia , Google ,


Yahoo! , CERN, NASA , Facebook , Amazon, Instagram , Spotify .

The social news networking site Reddit is written entirely in


Python.

Python is also used in backend web development, various math


operations and graph plotting.

fi
fi
21BCM027 KAVISH SHAH

Q - Basics of Numpy
What is NumPy?

NumPy is a Python library used for working with arrays.

It also has functions for working in domain of linear algebra, fourier


transform, and matrices.

NumPy was created in 2005 by Travis Oliphant. It is an open


source project and you can use it freely.

NumPy stands for Numerical Python.

Why Use NumPy?

In Python we have lists that serve the purpose of arrays, but they
are slow to process.

NumPy aims to provide an array object that is up to 50x faster than


traditional Python lists.

The array object in NumPy is called ndarray, it provides a lot of


supporting functions that make working with ndarray very easy.

Arrays are very frequently used in data science, where speed and
resources are very important.

Syntax for importing Numpy is “import numpy”.

NumPy is usually imported under the np alias.

You might also like