PYTHON 101: ULTIMATE PYTHON GUIDE
Tags: beginners, python, codenewbie, 100daysofcode
Published: 2022-02-13 13:52:04

---
title: PYTHON 101: ULTIMATE PYTHON GUIDE
published: true
description: A simple introduction to Python Programming Language
tags: #Beginner #Python #codenewbie #100daysofcode
//cover_image: ![Python 101 Cover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cow36oznygxnd2g8qu3a.png)
---
Have there been instances where you were hanging out with your tech buddies, as we like to call them, ‘tech bros’ they start talking about python this and python that? You are just there wondering why are people who don't specialize in veterinary services talking about a snake? Did you feel out of place? (This intro feels like I am trying to market something. I will stop there).

The purpose of this article is to guide you (in a technical and yet not so technical way) on how to install, configure, write your first python program and run it. We first have to understand what Python is. No, not the snake.

##Overview

Python is a high-level programming language released in 1991 created by **Guido van Rossum**. Python has a relatively simple syntax compared to other programming languages e.g. C++ and has countless use cases. Here are a few of them;
    1. Artificial Intelligence
    2. Desktop Application
    3. Automation
    4. Web Development
    5. Data Wrangling, Exploration And Visualization.

Python has a couple of features, including but not limited to;
    1. It is simple to write and run.
    2. It is open source
    3. It is Portable.
    4. It is embeddable & extensible.
    5. It has a huge collection of libraries.
    6. It is object-oriented.

##Setting up your Python Environment

The installation process is pretty simple. I'll guide you through the installation process for those using Ubuntu. I will leave some links to guides on how to install on Windows and Macs.
    1. Head over to the python website download page.
    2. Here’s the link: [Python](https://www.python.org/downloads/)
![Python Download Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzj69xqa0smzteux9xrg.png)
    3. Select the release you want.
    4. You can either choose to download the latest version (3.10.2) or scroll down and choose an older version. I chose version 3.8 for this installation.
    5. Install Python
You can either use the downloaded file to install Python or use the terminal. I prefer using the terminal since it is easier.

Below is a step by step guide for installing Python using the terminal.
    1. Run *Sudo apt install python3*. Follow the instructions given (Input password and type Y to continue).
![Install Python3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqe7d104lsk9xw3cesat.png)
    2. Run *Sudo apt install python3-pip* (Follow the instructions given on the terminal).
![Install Pip3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l5idybw74gxfj6vapfza.png)
    3. Run *pip3* or *python3 --version* to confirm that the installation was successful.
![Confirm Pip Installation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/th3xzas9b9r2peza3nco.png)
![Confirm Python Installation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2im2h824x5u5bjyf99ke.png)

Done. See how easy it is?
[Windows Installation](https://www.youtube.com/watch?v=UvcQlPZ8ecA)
[Mac Installation](https://www.youtube.com/watch?v=M323OL6K5vs)

##Write your first Program

I bet you feel like a real programmer now? Me too, I think it's time to start applying to those freelancing gigs on [Upwork](https://www.upwork.com/ab/jobs/search/?q=python&sort=recency)? Not so fast.

Let us write our first program, the usual ‘Hello World program’. We are going to use visual studio code. You can also use the normal notepad.
1. Open visual studio code and open a new text file.
![Open VS Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mr91zey5wz41h0nvpyx9.png)
2. There are two ways in this step, you can either click on ‘select a language’ if you are using visual studio or directly save the file and edit the .txt extension to .py.
![Save File](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6fg1hcurjeu24ho5y33e.png)
3. Now we are finally here, the best part about programming, writing the code. Your first line of code (if you are a total beginner, give yourself a clap).
As stated earlier, python has a pretty simple syntax, however, we will only write one line of code to display hello world. Unlike languages like C++ which requires multiple lines to display this simple greeting.

On the opened file, type *print("Hello World")* or *print('Hello World')*. Then click F5 for those working on visual studio.
Python does not care if you use the single quotes or double quotes, unless what you want to display has quotes in it e.g. *print("It's finally happening, I'm writing my first technical article")*.
![Python Hello World](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eqatmpjbjj93pqpqgyr3.png)

Finally, you can ask the user of your program to input certain details by using the input function and later print what the user inputs.
*print(input("What’s your name? "))*.
![Python Input](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbjr2cqcpsnrvbrx3fif.png)

That’s it for today. I hope this article has helped you in one way or the other. Feel free to leave feedback on what to improve on. I hope to write more on my programming journey.

##Resources
1. [Python Youtube Course](https://www.youtube.com/watch?v=_uQrJ0TkZlc)