# Day -13

**What is Python and Who is the creator of Python programming language?**

Python was created by Dutch programmer **Guido van Rossum** in the late 1980s while working at the National Research Institute for Mathematics and Computer Science in the Netherlands.

Van Rossum wanted to build a new scripting language that was accessible to everyone and not just limited to system programmers. He designed Python to be simple, intuitive, and general-purpose.

The key features that made Python popular are:

* The simple and readable syntax that resembles everyday English and minimizes programmer overhead
    
* Dynamically typed which allows variables to be used without declaring types
    
* Interpreted nature makes it easy to debug and test code interactively
    
* Automatic memory management reduces the chances of bugs
    
* Extensive libraries and frameworks for tasks like web development, AI, data analysis etc.
    
* Open-source nature with large community support across industry and academia
    

Today, Python is one of the most widely used high-level programming languages. All thanks to Van Rossum's vision of creating a language that focuses on code readability and developer productivity. It powers many complex systems and applications in fields like software engineering, data science, machine learning etc.

### Task 1: **How to Install Python?**

1. **Installing python on Ubuntu:**
    

commands:

`sudo apt-get update`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692664560315/0f84b95e-5f95-49de-9d55-cf751f73a3ad.png align="center")

Check whether Python is available or not.

`python3 --version`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692664621536/f4a0d754-cc06-4526-a4cd-b34656dc51ef.png align="center")

Use the below command to install the latest available version of python

`sudo apt --only-upgrade install python3`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692664638172/d787bd8a-8d4d-4852-851f-c506166fd0bd.png align="center")

1. **Installing Python on Windows:**
    

Link: [https://www.python.org/ftp/python/3.11.4/python-3.11.4-amd64.exe](https://www.python.org/ftp/python/3.11.4/python-3.11.4-amd64.exe)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692744650520/5c1c6f6a-7bc1-4ab1-ac80-e467e70c88c0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692744740175/0b3febaa-63f8-40d6-853a-4e1f183634cd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692666384732/499f4429-7ded-4925-8bac-f54152f69e74.png align="center")

As seen in the screenshot above, the Python installation was successful. Let's confirm this using the command prompt.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692744782990/bd67ebb8-34a7-4dee-998e-374b52485e1e.png align="center")

### Task 2: What are different Data types in Python?

**What is a data type?**  
In Python, a data type is a classification that tells the computer what kind of data you're working with, like numbers, text, or dates. It helps Python know how to handle and manipulate that data effectively.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692680500548/df000cb1-1205-4867-955e-6eb0ce6d9abb.png align="center")

**Dictionary:**

A dictionary is a data structure that stores values in key-value pairs. It is like a map or lookup table.

for example:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692747680985/0e6387e4-7897-4e11-9ffe-338d6a8fab7b.png align="center")

In this dictionary:

* "name", "age", "courses" are keys
    
* "John", 20, \["Biology", "Zoology", "Physics", "Chemistry"\] are values
    

The keys are used to lookup or access the values. Keys must be unique in a dictionary. Keys are usually strings or numbers.

Values can be any Python data type - strings, numbers, lists etc. Values are accessed using the keys.

Dictionaries are unordered, meaning there is no sequence. We cannot access items using index like we do in lists.

Dictionaries are mutable, meaning we can add, remove or modify data after creation.

So in summary, dictionaries provide fast key-value access to store and organize data in Python.

**Numeric:**

Represents numeric data types in Python like integers, floating point numbers and complex numbers.

\***Integers** - are whole numbers like 1, 2, 3.

\***Floats** - represent real numbers with fractional precision like 1.5, 3.14159.

**\*Complex numbers -** have real and imaginary parts like 1+2j.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692748645351/d79d0ac9-50c0-405d-ae18-c5674351eb72.png align="center")

**Boolean:**

* The Python Boolean type has only two possible values: `True` and `False`. It's used to represent truth values in logic and comparisons.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692749413597/ac627bde-4d61-4fe5-ac75-38c926ad330e.png align="center")

**Set:**

* A set is a collection of unique data. In other words, the elements of a set cannot be duplicated. It's useful for keeping track of distinct values.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692751307694/931c5fc3-b758-46dd-852f-6d3c620b8e41.png align="center")

**Sequence:**

* **List**: Lists are used to store multiple data items. There are no restrictions on the repetition of values in lists.
    
* **Tuple**: Similar to a list, but the difference is that once a value is assigned to a variable in a tuple, it can't be changed. Tuples are generally faster than lists.
    
* **String**: Strings are used to assign sequences of alphabetical characters or words to variables. They're commonly used to work with textual data.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1692751840065/8524afe9-1d53-45e9-ae6d-9bc34081b893.png align="center")

The key points are:

* Lists are created with \[\]
    
* Tuples are created with ()
    
* Strings are created with quotes "" or ''
    

These explanations should provide you with a solid understanding of these data types and how they function in Python!

Thank you for taking time to read the blog! 🙌

Wishing you a fantastic learning journey ahead! 🌟
