Page 432 - ComputerScience_Class_11
P. 432

MIND DRILL



                   Solved Questions


              A.  Tick ( ) the correct option.
                  1.  Mark the correct symbol used for a single-line comment in Python.
                    a.  //                                          b.  /* */
                    c.  #                                           d.  <!-- -->
                  2.  Which mode of Python allows execution of one command at a time?
                    a.  Script Mode                                 b.  Interactive Mode
                    c.  Compile Mode                                d.  Debug Mode
                  3.  Spot the example of a Boolean literal in Python.
                    a.  "Hello"                                     b.  3.14
                    c.  True                                        d.  None
                  4.  Select the activity that is commonly performed using Build Automation Tools.
                    a.  Drawing diagrams                            b.  Writing comments
                    c.  Learning syntax                             d.  Packaging software
                  5.  Which of the following is the smallest meaningful unit in a Python program?
                    a.  Variable                                    b.  Token
                    c.  Function                                    d.  Statement

                Answers
                   1.  c     2.  b    3.  c     4.  d     5.  b

              B.  Fill in the blanks.

                  1.  Python code is developed under an ………………… open-source licence.
                  2.  A ………………… is a tool that helps programmers identify and correct errors in their code.
                  3.  Python has a very large collection of ………………… libraries that users can easily access.
                  4.  Jupyter ………………… is an interactive programming environment mainly used for Python.
                  5.  ………………… are fixed or constant values that are written directly in a program.

                Answers
                   1.  OSI-approved  2.  debugger   3.  built-in   4.  Notebook   5.  literals



              C.  Answer the following questions:
                  1.  Explain any two uses of Python in detail.
                Ans.  The two main uses of Python are listed below:
                     •  Web Development: Python is used to create websites and web applications using frameworks like Django and Flask.
                     •  Software Development: It helps in building desktop applications, tools and automation scripts.
                  2.  What is the role of a compiler or interpreter in an IDE?
                Ans.  The compiler or interpreter converts the source code written by the programmer into a form that the computer can understand
                    and execute.
                  3.  What is the advantage of Python’s built-in libraries?
                Ans.  Python has a very large collection of built-in libraries that users can easily access. These libraries help programmers perform many
                    tasks without writing code from scratch.
                  4.  Name the different types of operators in Python.
                Ans.  Arithmetic, Assignment, Relational and Logical operators.
                  5.  Write any two characteristics of variables in Python.
                Ans.  Here are two characteristics of variables in Python:



                  430  Touchpad Computer Science (Ver. 3.0)-XI
   427   428   429   430   431   432   433   434   435   436   437