Comprehensive notes Python Basics Jupyter notebook AI 9 10 is applicable for students of class 9 and class 10 who are studying AI. So let’s go!

Python Basics Jupyter notebook AI 9 10

I have already written a detailed post on python basics for computer science class 11 part. Follow the below given links to read them:

Getting Started with Python
Python Fundamentals

Open Jupyter Notebook

If you missed the the article how to install and create virtual environment for jupyter notebook, follow this link:

Creating Virtual Environment

In the next section of Python Basics Jupyter notebook AI 9 10 you will learn how to open Jupyter Notebook and start your programs.

Launching Jupyter Notebook in Virtual Environment

Follow the below given steps to open Jupyter notebook in virtual environment:

  1. Click on Start > Anaconda Prompt. Anaconda Prompt will open.
  2. Now type conda activate env command. It will activate the virtual environment.
  3. Now type Jupyter Notebook.
  4. After few seconds Jupyter notebook will be launched in the browser.
Launching Jupyter notebook through Anaconda Prompt
Jupyter Notebook Screen

In the next section of Python Basics Jupyter notebook AI 9 10, you will get acquainted with the parts of jupyter notebook window.

Parts of Jupyter notebook window

Jupyter notebook window is mainly divided into 3 parts:

  1. Jupyter header with quit and logout button: It contains Jupyter Notebook logo in left and Quit and Logout buttons to the left of the screen to exit from the jupyter notebook.
  2. Tabs and Action Buttons: At the left side of this part, you will get tabs such as Files, Running, Clusters and Conda. In the next line, you will get buttons such as upload and New command.
  3. Folders and files on localhost: It displays a list of files and folders available on localhost.

Observe the following screen:

parts of Jupyter notebook window - Python Basics Jupyter notebook AI 9 10
parts of Jupyter notebook window – Python Basics Jupyter notebook AI 9 10

In the next section of Python Basics Jupyter notebook AI 9 10 we will see how to start a new notebook for starting the work.

Open a New notebook file

To open the new file for writing in Jupyter notebook, follow these steps:

  1. Click on New and select your choice to work with a particular environment. This option provides:
    1. Python 3
    2. Python [conda env:.conda-env]*
    3. Python [conda env:root]
  2. Now you will get a new browser window in the new tab with Untitled 1 – Jupyter Notebook.
New Jupyter Notebook
New Jupyter Notebook

The tool bar is available with different commands mostly used while using jupyter notebook. So understand the commands:

  1. Save: This is used to save the notebook
  2. +: Insert a new cell
  3. Cut, Copy, Paste: Used to cut, copy and paste the written text
  4. Up and down arrows: To move to up and down the cells
  5. Run, interrupt and restart the kernel: Run command is used to run the code, interrupt is used to interrupt the current code, restart the kernel is used to restart the kernel
  6. Code: Here you can change it according to your need out of Code, MarkDown, Raw NBConvert, Heading

using print() function in python

The print0 function is used to write the some text on the output console. Observe the following:

print("Hello, My Dear Student this is Python")

Remember this key points while using print() function in python:

  1. The text must be enclosed with quotes.
  2. You can use single or double quotes.
  3. You can also print the value of variable that we will see later.

Using multiple print() statement

You can use multiple print() function to print more lines. As much lines you want as much print() function should be required. Observe the following lines, I want three lines, so I have used the print() function three times.

print("My name is Sanjay Parmar.\n")
print("I am very excited to learn python.\n")
print("I am using Jupyter Notebook.\n")

The “\n” is used to add a blank line between the lines in the output. You can ignore that if you down want any blank lines between the lines in the output.

So I hope you enjoyed this article Python Basics Jupyter notebook AI 9 10 and learn how to use jupyter notebook for coding. In the next article will see the topic.

If you really enjoyed the learning. Hit the like button, share this article with your friends. Feel free to ask anything about this article in the comment section. You can share your valuable suggestions, feedback, views about this article Python Basics Jupyter notebook AI 9 10 in the comment section as well.

Thank you very much for visiting our blog.

Follow this link to access all the contents of Artificial Intelligence.

Artificial intelligence

Leave a Reply