How to run Python code on Google Colaboratory
Prerequisite: How to use Google Colab
Google provides Jupyter Notebook like interface to run Python code on online Virtual Machines. In this article, we will see how to run simple Python code on Google Colab.
Step #1: Open https://colab.research.google.com/

Step #2: Select New Python3 Notebook

Step #3: Start Typing code into the code cells.
Import all necessary libraries.

Step #4: To add new cell, click on Insert->Code Cell

Step #5: To run a particular cell, select the cell and press Ctlr + ENTER keys.

Code cells under process

Output after successful run
Recommended Posts:
- Performing Google Search using Python code
- Cracking Google Summer of Code 101
- Google Summer of Code Preparation
- How to Prepare For Google Summer of Code - A Complete Guide
- Python | Get a google map image of specified location using Google Static Maps API
- Issues with using C code in Python | Set 1
- Issues with using C code in Python | Set 2
- Python code to convert SOP to POS
- Code introspection in Python
- Morse Code Translator In Python
- Execute a String of Code in Python
- Debugging Python code using breakpoint() and pdb
- Packaging and Publishing Python code
- Optimization Tips for Python Code
- Different Python IDEs and Code Editors
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



