Day 13 - 90DaysofDevOps
Introducing Python
Python:- Python is an 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.
The main features for which it is so much famous and used widely in all over the world:-
Easy to code and read.
Expressive.
Free and Open-Source.
High-Level.
Interpreted.
Object-oriented.
Large standard library.
Let's keep it simple today. Are you ready to install python with me on your system!!!!!!
Installing Python
Currently, I am using Ubuntu VM. so I will show how to install Python.
In Unix-based systems, python can be installed through package managers. As we discussed in our previous blogs, there are different package managers for different OS. In Linux it is YUM but in Ubuntu it is APT-GET.
$ apt-get install python<version_name>
If you are using windows you can download the package from the below link:-python.org/downloads
Before installing of python
It is not in my system so need to install
Data types in Python
What is a data type?
It is the data or the information that we feed to our programs or codes that may be in the form of user inputs or default values that get analyzed and provide required outputs.
Number:
Integer - This value is represented by the int class. It contains positive or negative whole numbers.
Float - This value represents by the float class. It contains decimal values.
Complex - Complex number is represented by a complex class. It is specified as (real part) + (imaginary part)j.
Dictionary:
It is an unordered collection of data values, used to store data values like a map, unlike other Data Types that hold only a single value as an element, a Dictionary holds a key: value pair.
Boolean:
The Python Boolean type has only two possible values:
True
False
Set:
A set is a collection of unique data. That is, elements of a set cannot be duplicated.
Tuple
It is similar to a list but the difference here is we can't change the value once it is assigned to a variable. It is faster than a list.
String
String: It is the datatype for assigning alphabetical words or lines to the variable.