How do I run Python on Google Colab using android phone?

Regardless of whether you are an understudy keen on investigating Machine Learning yet battling to direct reproductions on huge datasets, or a specialist playing with ML frantic for extra computational force, Google Colab is the ideal answer for you. Google Colab or "the Colaboratory" is a free cloud administration facilitated by Google to support Machine Learning and Artificial Intelligence research, where frequently the obstruction to learning and achievement is the necessity of gigantic computational force.


Table of content-

  • What is google colab?
  • how to use python in google colab?
  • Program to add two strings given by the user.
  • save the file in google colab?


What is google colab?

colab

You will rapidly learn and utilize Google Colab on the off chance that you know and have utilized Jupyter notebook previously. Colab is fundamentally a free Jupyter notebook climate running completely in the cloud. In particular, Colab doesn't need an arrangement, in addition to the notebook that you will make can be all the while altered by your colleagues – along these lines you alter reports in Google Docs. The best benefit is that Colab upholds the most famous AI libraries which can be effectively stacked in your notebook.


how to use python in google colab?

Step 1: go to your favorite browser, and search google colab. as shown below.

google colab

now you can see the results as in the below screenshots-

search for google colab

Step 2: Click on the first result which says 'Google Colaboratory' from https://colab.research.google.com/

search for google colab

Now you will land on the site and the site will be as shown in the screenshots below.

google colab on android

Step 3: Now click this icon on the menu bar to write the code you want.

Step 4: now write your code here.

Step 5: Now click on the run button here.

run python on google colab

now a cool animation is in front of you at the run button, wait for some seconds for full execution of the file. now as you can see the program has ended successfully. as you can see in the screenshots.

run python on google colab

Now you can see in the below screenshot that it gives us 12 GB of ram which is good for machine learning.

ram given by google colab

Now build a program which will add two strings which user will give so-


Step 1: delete all the templates from colab by clicking on them once and then click on the delete icon in the pop-up menu. after deleting all the templates you will get a clear screen. as shown below screenshots.

google colab

Step 2: click on the text icon to add text to your file. as shown below.

add text on google colab

Now a window will appear as shown below.

google colab on android

Step 3: write the text you want to write in the file. 

Step 4: to write the python script click on these angle brackets. as in the provided screenshots below.

Step 5: now write the code you want to execute on colab. as shown in screenshots below.

python on google colab

Step 6: Now click on run

Step 7: give the inputs to the program.

so the program ends with a correct output, as shown below.

python on android using google colab

saving file in colab-


so in order to save the file, I will aware you this file will be directly saved to your google drive. so to save on your phone you will need to download this file from your drive, so follow these simple steps to download your python file.


Step 1: Click on three horizontal lines in the top menu. as shown below.

saving file in google drive using android google colab

Step 2: click on save. as done below.

saving file in google drive using android google colab

you will see a pop-up window that says creating a copy, let it be done make sure do not close it.

saving file in google drive using android google colab

Step 3: Open your google drive, you will see a folder on the drive named colab notebook, simply click on it you will see a file.

 downloading file from google colab

 

downloading file from google colab

Step 4: click on the file, it will show you a number of options. then click on download your file will be downloaded automatically.

downloading file from google colab

👉click here for more ways to use python on android👈

I have this youtube channel called Road2geeks in here you'll be seeing various tutorials along with some knowledge that I have voiceover so do also check our channel Road2geeks so that's all for this blog friends thank you very much for reading this blog, meet you in the next blog until then stay safe Jai hind.

Post a Comment

0 Comments