What is Python?
Python is a Open source, general purpose, high level, and object-oriented programming language.
It was created by Guido van Rossum
Python consists of vast libraries and various frameworks like Django,Tensorflow, Flask, Pandas, Keras etc.
How to Install Python?
You can install Python in your System whether it is window, MacOS, ubuntu, centos etc. Below are the links for the installation:
Ubuntu: apt-get install python3.6
Task1:
Install the Python in Ubuntu and check the version:-
Syntax: sudo apt install -y python3-pip
python3 --verison
Pyhton install and version command check diagram.
Various Data type in Python Diagram
Python data Types:
There are several types of data types in Python. Some built in python data types are which are as following:
1 Python Numeric Data Types:
Numeric data type is used to hold numeric values like;
a) int- holds signed integers of non-limited length
b) long-holds long integers
c) float-holds floating precision numbers.
d) complex-holds complex numbers.
2 Python String data Type:
The String is a sequence of characters, Python supports Unicode characters, Generally strings are represented by either single or double quotes
Python strings Data Types Diagram.
3: Python List Data Types:
Lists are just like the arrays, which is used for collection of data. it is very flexible as the items in a list do not need to be of the same type.
# list of having only integers:
list of having only integers diagram.
# list of having only strings:
list of having strings diagram
# list of having both integers and strings:
both integers and strings diagram.
4: Python Tuple:
it is a another data type which is a sequence of data similar to a list.but it immutable.Data in a tuple is written using parenthesis() and commas.
5: Python Dictionary:
Dictionaries are used to store data values in key:value pairs.
A dictionary is a collection which is ordered*, changeable and do not allow duplicates.
# print value having key=1
syntax:- print (a[1])
# print value having key=2
syntax:- print (a[2])
# print value having key=3
Syntax:- print (a[3])
Thank you for Reading.