Introduction

Python is a widely used general purpose programming language. It can used to build all sorts of things like websites, crawlers, machine learning models and even games! Due to its very simple syntax and huge community, it is easy to get started and find lots of resources to learn online and this tutorial series is one of them.

Hello World!

Let’s jump right into the first program you will write while learning any language: printing: Hello World! Click Submit button below to run the code and see the results.

print("Hello World!") print("Hello World!") success_msg("Great job!")

You ran your first Python code! Try changing the text from Hello World! to something else and submit it again and see your new message being printed. Don’t forget to surround your text by double quotes.

This is a very simple program that prints a message. print is a function that is made available by Python for us to display messages in the console. If you want to try it in your computer, then

  • create a file called hello.py in any folder in your computer
  • open command prompt or terminal and go to the folder where hello.py is located
  • enter python hello.py in the terminal and press Enter

Screenshot

Install Python

Installing Python is pretty easy. In many operating systems Python is already installed. You can check which version of Python is installed by typing

python --version

in your terminal. It should print something like “Python 3.7.3”. If it says “Command not found” or something similar then probably Python is not installed in your machine. On some operating systems, there are two versions of Python installed. When you just type python in your terminal usually it will start Python 2.X and you may need to type python3 instead of just python to use version 3.X of Python.

In general it is recommended to use atleast Python 3.7.

You can download Python version of your choice and for your OS from here

Development Environment

When you want to write programs using Python, you can use any text editor you want but generally using an editor that supports Python will greatly increase your development experiece. Code editors or Integrated Development Environment (IDE) provide features like syntax highlighting, code completion, error detection and much more. Popular and free editors include Visual Studio Code and PyCharm.

Follow their installation instructions to install it in your machine.

Conclusion

This is just the beginning and there is a lot to learn but you have to start somewhere. In the next posts, I will show you the basics of Python and how to use different features offered by this programming language. You should also check out other resources in Youtube or other blogs to gain further knowledge on Python and programming in general.

Updated:

Comments