Computer Language (Python)
Introduction to Python:
It is a programming language which is used to give instruction to machines.
Python language is used in many placed due to its vocabulary (keywords/readymade
solutions/libraries) which can be used in any domain for that matter.
Python is so popular for following reason:
Readability (easiest language)
Multipurpose
Object oriented
Open source
Portable/Platform Independent
Libraries
Comparison:
Data in Python:
Data are different types of variables in which the data are stored and for future reference
and coding. Below are few data types used in Python language.
String:
String is denoted as str. It is a data type in which we can store Text data within
single/double/triple quotes.
Integer:
Integer is denoted as int. It is a data type in which whole numbers can be stored without
any single/double/triple quotes.
Float:
Integer is denoted as float. It is a data type in which decimal numbers can be stored
without any single/double/triple quotes
Boolean:
Integer is denoted as bool. It is a data type in which either True/Fales results can be
stored without any single/double/triple quotes
Data structures in Python:
Data are small and simple in nature, however in real/production environment data will be
complex and huge and there will be few challenges in accessing such data. Below are the challenges
in simple data type.
Storing the data
Search for a particular row(data)
Insert a new row(data)
Update a particular row(data)
Delete a particular row(data)
Sort the data.
Data structures is an efficient way of storing and organising data in such a way so that we as
developer can easily access and manage the data.
There are 2 types in Data Structure, as below:
List:
Integer is denoted as list.
A list is represented by []
A list can contain values of any data type
A list allows manipulation (add/delete/or make any kind of changes)
Indexing is supported in list
Tuple:
Integer is denoted as tuple.
A tuple is represented by ()
A tuple can contain values of any data type
A tuple is a read only data structure, which means it is non-manipulative (cannot
add/delete/or make any kind of changes)
Indexing is supported in tuple
Set:
Integer is denoted as set.
A set is represented by {}
A set is known for sorting unique/distinct values only, in other words set do not
allow duplicates
Set is unordered in nature; hence indexing is not supported in Set.
Set can be used to implement mathematical sets.
Dictionaries:
Integer is denoted as dict.
It is a special data structure
It follows Key-Value format {key:value, key:value}
A Key is always immutable type, i.e. (int/float/str/bool/tuple). Using list as key will
result in error
Value can be of any data type
A dict is also represented using {K:V}
Few commonly used functions and their Syntax
1. If-Elif-Else:
This is a conditional statement which can be used as dissension making while coding.
2.
3.
Numpy
It is that part of Python which is used for Data science
Agenda:
Introduction:
It is an extension to Python. It is very powerful and basic libraries for mathematical work
which will allow be used for scientific/engineering/ mathematical approach.
Difference in Numpy vs Python:
ND Array:
Matrix Manipulation
Misc excises: