- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to run Python code on Google Colaboratory?
Google Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. It is hosted in google cloud and maintained by Google for the benefit of python coders who want to run and test python scripts using a cloud environment. In this article, we will see how to set up and run a google collaboratory cloud environment.
Opening the Python Notebook
We navigate to this google link (https://colab.research.google.com/). It opens up the below screen. We choose the option NEW PYTHON3 NOTEBOOK from the bottom right corner as shown in the diagram below.
On clicking the NEW PYTHON3 NOTEBOOK we get a new screen that allows us to write the code in python version 3 and also give a name to the file where this code is going to be stored. We can see the options to add a code cell and text cell etc, similar to the features we get in the jupyter notebooks.
Writing Python Code
Now we can write the python code in the code cell created above. We can import the require d libraries and write code to sue the libraries as we do in any normal python code.
Running the Python Code
Next, we can run the above code written by pressing the black run button mentioned in the top left corner above the code. The code runs for some time and the result is printed below as shown in the picture below.
- Performing Google Search using Python code?
- Why does Python code run faster in a function?
- How to run Python Program?
- How to Block Pop-Ups on Google Chrome?
- How to Run a Python Program
- How to show current location on a google map on Android?
- Python script to open a Google Map location on clipboard?
- How To Run Commands On Multiple Remote Servers Simultaneously
- How to run Selenium tests on Chrome Browser using?
- How to run Selenium tests on Internet Explorer browser?
- Ok google a google voice search on chrome beta
- How to use Google Fonts on your web page?
- Run Postman Collection on Jenkins
- How to download Google Images using Python
- How to efficiently run complex queries on MongoDB unindexed fields?