Day 13 Task: Basics of Python

Day 13 Task: Basics of Python

What is 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.

How to Install Python?

You can install Python in your System whether it is Windows, MacOS, ubuntu, centos, etc. Below are the links for the installation:

Task1 :

  1. Install Python in your respective OS, and check the version.

2. Data Type in Python

There are different types of data types in Python. Some built-in Python data types are:

Python Numeric Data type

Integers, floating-point, and complex numbers fall under the Python numbers category. they are defined as the below classes in Python.

Int - Holds signed integers of non-limited length.

float - Holds floating decimal points and it's accurate up to 15 decimal places.

complex - Holds complex number.

Python String Data Type

String is a sequence of characters represented by single(') or double quotes (").

a = "Hello Dosto"
b= 'I am Agnes'
print(a)
print(b)

Python List Data Type

A list is a collection of similar or different types of Items separated by commas and enclosed with bracket []

list integer :

a= [1,2,3,4,5,6]
print(a)

list of string

b=["hii","hello","good"]
print(b)

list of integers and strings

x= ["hello","Agnes",1,5,7]
print(x)

4. Python Tuple:

Tuple is an ordered sequence of items same as a list. The difference is it is immutable. Data in a tuple is written using parenthesis ( ) and commas.

#tuple having multiple type of data.

x=("hi", 1,2,3,"Agnes")
print(x)

Thank you for reading this blog !

Happy Learning!