Day 13: Introduction to Python

Python was created by Guido van Rossum, and released in 1991
What is Python?
Python is an Open source, general-purpose, high-level, and object-oriented programming language.
Python consists of vast libraries and various frameworks like Django, Tensorflow, Flask, Pandas, Keras, etc.
Task 1: How to Install Python?
For Ubuntu:
sudo apt update
sudo apt -y upgrade
sudo apt install -y python3-pip
For Windows:
https://www.python.org/downloads/
Task 2: Data Type in Python
- Numeric Data Type
Python numeric data type is used to hold numeric values like;
int - holds signed integers of non-limited length.
long- holds long integers(exists in Python 2.x, deprecated in Python 3.x).
float- holds floating precision numbers and it’s accurate up to 15 decimal places.
complex- holds complex numbers.
String
The string is a sequence of characters. Python supports Unicode characters. Generally, strings are represented by either single or double quotes.
List
Python's list is a flexible data type that is not found in other programming languages such as C/C++. Essentially, it is similar to an array. However, the unique aspect of a list in Python is its ability to store different data types simultaneously. A list is a structured collection of data that is written using square brackets([]) and commas(,). The data is arranged in a specific order, allowing for easy access and manipulation of the elements in the list.
Tuple
The tuple is another data type which is a sequence of data similar to a list. But it is immutable. That means data in a tuple is write-protected. Data in a tuple is written using parenthesis and commas.
Dictionary
Python Dictionary is an unordered sequence of data of key-value pair form. It is similar to the hash table type. Dictionaries are written within curly braces in the form
key:value. It is very useful to retrieve data in an optimized way among a large amount of data.



