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:
Open Jupyter Notebook
If you missed the the article how to install and create virtual environment for jupyter notebook, follow this link:
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:
- Click on Start > Anaconda Prompt. Anaconda Prompt will open.
- Now type conda activate env command. It will activate the virtual environment.
- Now type Jupyter Notebook.
- After few seconds Jupyter notebook will be launched in the browser.
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:
- 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.
- 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.
- Folders and files on localhost: It displays a list of files and folders available on localhost.
Observe the following screen:
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:
- Click on New and select your choice to work with a particular environment. This option provides:
- Python 3
- Python [conda env:.conda-env]*
- Python [conda env:root]
- Now you will get a new browser window in the new tab with Untitled 1 – Jupyter Notebook.
The tool bar is available with different commands mostly used while using jupyter notebook. So understand the commands:
- Save: This is used to save the notebook
- +: Insert a new cell
- Cut, Copy, Paste: Used to cut, copy and paste the written text
- Up and down arrows: To move to up and down the cells
- 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
- 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:
- The text must be enclosed with quotes.
- You can use single or double quotes.
- 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.