Page 211 - Ai Book - 10
P. 211

4.  What does the input() function do in Python?

                 a.  Display output on the screen
                 b.  Accept input from the user

                 c.  Perform arithmetic operations
                 d.  Create a virtual environment
            5.  Which menu in Jupyter Notebook is used to run all or specific cells in the notebook?

                 a.  Edit menu                                      b.  Kernel menu
                 c.  View menu                                      d.  File menu

            6.  What is the primary purpose of a virtual environment in Python development?
                 a.  Run Python code without Anaconda

                 b.  Install Jupyter Notebook
                 c.  Share code with others
                 d.  Keep dependencies for different projects separate

            7.  What is the purpose of the conda activate command?
                 a.  Start Jupyter Notebook

                 b.  Install Python packages
                 c.  Activate a virtual environment

                 d.  Update Anaconda
            8.  Which operator is used for exponentiation in Python?

                 a.  ^                                              b.  **
                 c.  //                                             d.  *
            9.  What does the not operator do in Python?

                 a.  Performs arithmetic operations
                 b.  Inverts a value

                 c.  Checks for equality
                 d.  Compares two values
          10.  Which toolbar icon in Jupyter Notebook is used to save a copy of the existing notebook?

                 a.  Insert Cell Below                              b.  Save and Checkpoint
                 c.  Run                                            d.  Interrupt The Kernel

        B.  Fill in the blanks.

            1.  To create a new virtual environment in Anaconda, the command is conda create -n ______________
                python=3.11.

            2.  The Jupyter Notebook interface has a menu bar at the top, and the ______________ menu is used for
                basic operations like opening a new document and saving.
            3.  The print() function in Python is used to print the specified ______________ to the screen.
            4.  The ______________ operator in Python is used for logical AND, and it evaluates to true only if both of
                its operands are true.

                                                                                                              85
                                                                                                              85
   206   207   208   209   210   211   212   213   214   215   216