Hello and happy 2020 to you all, in this year I will continue to write more python related articles and continue to build up this website which is not only for python programming but also other interesting topics such as game creation with Godot and other game engines, Linux and Windows related topics and online earning opportunity. In the Python part, we will start to build a few online projects using Google Colaboratory and a few offline projects using various IDEs. So let us get started immediately!

In this article, I will create a simple python program just to familiarize myself with Google Colaboratory which is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. With Colaboratory we can write and execute code, save and share our analyses, and access powerful computing resources, all for free from our own browser. With Colaboratory, we do not need to download any extra python modules that we need in our python program, for example, numpy which will be needed to perform various mathematics jobs.

We will create a simple python function with Google Colaboratory that will return true if the string which has been entered as a parameter into that function is a digit from 0-9 or else that function will return false.

The first step is to start a new python 3 project, go to File->New Python 3 notebook after you have logged into your own Google account.

Create a new Python 3 project

We can further rename the python file but for now, let just leave that alone and concentrate on creating the simple python function first. Click on the Code button to create a new code then type in the below lines of code and press the play button next to the code editor to run the program.

Press the Code button to create a new python code.
The program will return True if we have entered “6” into the above function.

After we have created the first program we can rename the above python file by going to File->Rename and then start to type in the new name for that python file. Below is the full python program.

The filename has been changed.

There is a lot of good stuff that this online IDE can provide which we will start to explore when we create another python project in the coming chapter! What is your thought about Colaboratory, leave your thought below this post.

Click to rate this post!
[Total: 1 Average: 1]
Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *