DEV Community

Cover image for python 101: Ultimate Python Guide
Donaldtweede
Donaldtweede

Posted on

python 101: Ultimate Python Guide

Introduction

Python is a widely used general-purpose, high level programming language. It was created by Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was designed with an emphasis on code readability, and its syntax allows programmers to express their concepts in fewer lines of code. it is also referred to as general purpose programing language due to its wide range of applications such as:

  • Data Analytics
  • Data science
  • Web development
  • Machine learning

Insatlling python

Before you start, you will need Python on your computer.Check whether you already have an up to date version of Python installed by entering python in a command line window. If you see a response from a Python interpreter it will include a version number in its initial display. Generally any Python 3.x version will do, as Python makes every attempt to maintain backwards compatibility within major Python versions. if you dont have it then you can download the installer from python.org.

*Step1: download the installer
*

Open your favorite browser window and navigate to the python download page for Windows.
Click on the link for the latest Python 3 Release.

Step2: Run the installer

Double-click on the downloaded .exe file and you should see the following window pop up;

     ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwbfu3gq5gbry93ojy62.jpg)
Enter fullscreen mode Exit fullscreen mode

Important: Make sure to check the box that says add python 3 x to path to ensure that the install places the interpretor into your execution path.
Click on Install now to install Python 3 and wait for the installation to finish.

First python program

Now that we are done with python 3 installation, it's time time to write our first program.
There are numerous IDE's and text editors to write Python code but in this tutorial we'll use Python's built'in IDLE.
To open IDLE, type the following command in youe command prompt.
$ idle-python3.9
IDLE opens a Python shell in a new window.
The Python shell is an interactive environment that allows you to write python code and execute it imediately.
This is we write our "Hello, world" program.
To print out something in Python, we use the print() function.
Type the code below in your interactive python shell.
print("hello,World!")

   ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljbi6048wwairs9bwnz9.png)
Enter fullscreen mode Exit fullscreen mode

Running our first code

Before running our code, we need to save it. Click on File then Save As and save your code as "introhello world.py".
Notice the .py extension; that tells our intepretor that it is running a python code.
After saving your code, click f5 to run.
If all went well, the following window should appear;
Hello world

conclusion

This was a tutorial on getting started with Python programming. We have gone through the installation provess and written our hello, world program.
But there is more to Python programming than that.
In the next article, we'll be looking at functions and variables.
Thanks for your time.

Top comments (0)