Skip to content

Latest commit

 

History

History
82 lines (64 loc) · 3.62 KB

exer1.md

File metadata and controls

82 lines (64 loc) · 3.62 KB

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors Visitors

Exercise 1: Introduction to Google Colab

Step 1: Open Google Colab

  1. Open your web browser and go to Google Colab.
  2. # to your Google account if you are not already signed in.

Step 2: Create a New Notebook

  1. Create a New Notebook:
    • On the Colab homepage, click on "File" in the top-left menu.
    • Select "New notebook" from the dropdown menu.
    • A new notebook will open with an empty code cell.

Step 3: Write a Simple Python Script

  1. Write Python Code:
    • In the first cell, type the following Python code:
      print("Hello, World!")

Step 4: Run the Code Cell

  1. Run the Code:
    • Click on the cell to select it.
    • Press Shift + Enter to run the cell.
    • You should see the output "Hello, World!" below the cell.

Step 5: Add a Text Cell

  1. Add a New Cell:

    • Click on the "+" button in the toolbar to add a new cell below the current one.
  2. Change Cell Type to Markdown:

    • With the new cell selected, click on the dropdown menu in the toolbar that says "Code" and change it to "Text".
  3. Write Text:

    • In the new markdown cell, type the following:
      # My First Google Colab Notebook
      This notebook contains a simple Python script that prints "Hello, World!".
  4. Render the Markdown Cell:

    • Press Shift + Enter to render the markdown cell. The text will be formatted as a heading and a paragraph.

Step 6: Save Your Notebook

  1. Save the Notebook:
    • Click on "File" in the menu and select "Save" or "Save a copy in Drive".
    • If you choose "Save a copy in Drive", a copy of the notebook will be saved to your Google Drive.

Final Notebook

Your final notebook should look like this:

  1. Markdown Cell:

    # My First Google Colab Notebook
    This notebook contains a simple Python script that prints "Hello, World!".
  2. Code Cell:

    print("Hello, World!")
  3. Output:

    Hello, World!
    

You have now created, edited, run, and saved a simple notebook in Google Colab.

Contribution 🛠️

Please create an Issue for any improvements, suggestions or errors in the content.

You can also contact me using Linkedin for any other queries or feedback.

Visitors