Python 101: Ultimate Python Guide
Tags: beginners, tutorial, python
Published: 2022-02-11 12:26:54

## Why Python?

Python is a clear and powerful interpreted, general purpose, object-oriented programming language with classes and multiple inheritances. Python is a dynamically typed and garbage collected language. Why dynamic? We don't have to declare the type of a variable while assigning a value to a variable in Python.
- A variety of basic data types are available: numbers (floating point, complex, and unlimited-length long integers), strings, lists, and dictionaries. 
- Clean error handling
- Memory management, involving a private heap containing all Python objects and data structures.
- Python uses an elegant syntax, making the programs you write easier to read, easy to test and it runs anywhere, including Mac OS X, Windows, Linux and Unix.
- Python is free to use and is available under open source.

**Use cases:**

Python is a multipurpose programming language. You can use Python for, but not limited to:
1. Machine learning and AI. Python is the number 1 programming language for machine learning and data science.
2. Web development.Using Python and a framework called Django.
3. Automation

**Setting up**

You need to install Python 3 interpreter in your computer. This will read and execute our Python programs. Python 3.10 is the latest version with the latest features. This article uses Python 3.8 (which is the latest security release), in the [conda](https://docs.conda.io/en/latest/) environment.

_**Read more about setting up the environment**_ [here](https://wiki.python.org/moin/BeginnersGuide/Download)


### Hello World!
Whatever your reason for learning Python is, it's possible. We shall kick off the journey with our first app.
**Run python**
Once the installation is complete you can run python.

1. 
**Running Python in the terminal** by typing `python` and writing python code next.

```
eazzy@eazzy-HP-ProDesk-400-G3-MT:~$ conda activate my_env
(my_env) eazzy@eazzy-HP-ProDesk-400-G3-MT:~$ python
Python 3.8.12 (default, Oct 12 2021, 13:49:34) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello world')
hello world
>>> 

```
Type `quit()` to exit python if you wish to.

2. 
**Run Python in Integrated Development Environment (IDE)**

Prerequisites

Specifically, we require:
[VS Code](https://code.visualstudio.com/Download)
VS Code [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)

Create an empty directory called `hello` In it we will create our python file. A python file file has a .py extension. Open in vs-code.
From the File Explorer toolbar, select the New File button on the hello folder. Name the file `hello.py`, and it automatically opens in the editor.

```
msg = "Hello World"
print(msg)
```
Click the Run Python File in Terminal play button in the top-right side of the editor.
You will get the following output.

![vs code screen grab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bhhq5ca61qsw3d8kqvxz.png)

Happy dance! We just wrote our first program in Python.



There is then much more to explore with Python in Visual Studio Code.

Next we shall learn about [the basics of python.](https://dev.to/evansmutwiri/python-101-the-basics-57in)

___

## Resources
[Reference](https://wiki.python.org/moin/BeginnersGuide/Overview)
[BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide/NonProgrammers)
[PythonChecker Makes Your Code Great Again](https://www.pythonchecker.com/)