Page 214 - Ai Book - 10
P. 214
2. Assertion: The // operator in Python performs floor division.
Reason: It returns the whole number adjusted left to the number line.
a. True, and the Reason is the correct explanation.
b. True, but the Reason is not the correct explanation.
c. False, and the Reason is the correct explanation.
d. False, and the Reason is not the correct explanation.
3. Assertion: The ‘and’ logical operator in Python returns true only if both conditions are true.
Reason: It is used to combine multiple conditions, and if any condition is false, the overall result is false.
a. True, and the Reason is the correct explanation.
b. True, but the Reason is not the correct explanation.
c. False, and the Reason is the correct explanation.
d. False, and the Reason is not the correct explanation.
AI Fun Zone 21st
21st
Century Project-based Learning
Century
Skills
Skills
Prepare a PowerPoint presentation on the Topic ‘Jupyter’ Notebook.
AI Activity Zone
Experiential Learning
Activity 1: Coding in Virtual En
Activity 1: Coding in Virtual Environmentvironment
Open Anaconda Prompt to create a new virtual environment named ‘myenv’ with Python version 3.11 and
write a code to print different types of strings.
Activity 2: Exploring Jup
Activity 2: Exploring Jupyter Notebook Interfaceyter Notebook Interface
Open Jupyter Notebook using the command jupyter notebook. Create a new Python 3 notebook and
change its name to ‘MyFirstNotebook’. In the first cell, type a simple Python print statement to display
a message. Execute the cell and observe the output. Take a screenshot of the entire Jupyter Notebook
interface.
Activity 3: Working with Jupyter Widgetsorking with Jupyter Widgets
Activity 3: W
Inside a Jupyter Notebook, use the Widgets menu to create a slider widget. Write a small Python code that
prints the square of the value selected on the slider. Execute the cell and interact with the slider to observe
the changes. Provide a brief explanation of the interaction.
Activity 4: Basic Python Programming in Jupyter Notebookrogramming in Jupyter Notebook
Activity 4: Basic Python P
In a Jupyter Notebook, create a new code cell and write a Python program that takes two numbers as input
from the user using the input() function. Perform addition, subtraction, multiplication, and division on
these numbers and display the results. Execute the cell and provide the output.
88
88