• Premanand S

03 Python - How to run the programs?

Hello, gentlemen! Excellent day to everyone; I hope everyone is in good health in this scenario; it's one of the most important things everyone needs. In the previous articles, we have covered the topics from the scratch like an introduction to python and features and applications related to python then lastly, we have seen the advantages and disadvantages of python right. I hope I have justified the contents briefly with some clarity, let’s assume it has I hope. So, today’s article is important for the programming part w.r.t python language, this is the base for our future series of articles. So, in today’s article, we will be seeing how to run a python program?

Table of Content:

  1. Introduction – how to run a python program?

  2. Python command prompt

  3. Command prompt or Anaconda command prompt window

  4. Text editor – Notepad and command prompt

  5. Anaconda IDE

  6. Google Colab

Introduction – how to run a python program?

There are many methods to run a python program, as the technology is developing day by day, many new tools, software’s and technologies are coming to our market to make our work easy. Throughout the series, we will be working on the Windows operating system only. Here in this slide, we will be seeing the general approaches to run python programs,

  1. Python command prompt

  2. Command prompt or Anaconda command prompt window

  3. Text editor – Notepad and command prompt

  4. Anaconda IDE

  5. Google Colab

So, we will see about these methods in short, in this article.

The 1st approach is by python command prompt, for that we need to go to the official python website, then download the latest version, once installation gets over. open the start button and search python in that, you will be seeing python 3. 10.. click on the icon.. so this is how the screen will look like, just type print(“Hello youtube”) or any other sentence within the double quote. After that, if you hit enter button you will get the typed words as output. This is a very basic approach.

2nd approach is by command prompt or by anaconda prompt, I go for anaconda prompt here, the first type the same line as we typed in python window, what we are getting error right, ok fine, now type the word python, then enter it, then go for the line.. now we are getting right. So we are saying to our system provoke python kind of thing here, so afterward if we type any small function or any operation, we will see the output as shown below,

3rd approach is through notepad, here open the notepad, then type anything, don’t bother about the codes here, we will see from scratch, this is a video meant for different approaches to run python alone. So back to the track, type the line as, greeting = input(“Enter the name of the person”), enter it, then print(“Hey good morning,”, greeting), then save it, sample.py and all files type here. Now close it. Now open the anaconda prompt then call this file. In the anaconda command prompt, just type python then the file name sample.py, if you enter it means you will get the "Enter the name of the person" as user input format, if you type it some name like PREMANAND, then enter it, you will get the output as Hey Good morning PREMANAND....

4th approach. For this you don’t want to install any software, the internet is enough. Then we have an option called - Google Colab,

Inorder to see the full concept clearly, https://www.youtube.com/watch?v=lbdYx9mlPaQ&t=20s


So in this article, we have seen some most common different methodologies to run the python program. If you find this article to be useful, please leave your thoughts/opinions in the comments area below. Learning from your mistakes is my favorite quote; if you find something incorrect, simply highlight it; I am eager to learn from students like you. Will continue in the next article about features, applications, and advantages & disadvantages of Python.

About me in short, I am Premanand.S, Assistant Professor Jr and a researcher in Machine Learning. Love to teach and love to learn new things in Data Science. Mail me for any doubt or mistake, er.anandprem@gmail.com, and my Linkedin https://www.linkedin.com/in/premsanand/

45 views0 comments