Page 435 - ComputerScience_Class_11
P. 435

2.  x = 10
                       y = "5"
                       result = x + y
                       print("The result is: ", result)

                   Ans.  x = 10
                       y = 5
                       result = x + y
                       print("The result is: ", result)
                    3.  version.length = 5

                       width = 10
                       area = length1 * width2
                       print("The area of the rectangle is:", Area2)
                   Ans.  length = 5
                       width = 10
                       area = length * width
                       print("The area of the rectangle is:", area)

                      Unsolved Questions


                 A.  Tick ( ) the correct option.

                    1.  Which of the following is a use of writing security tools in Python?
                       a.  Web Development                             b.  Software Development
                       c.  Web Scraping                                d.  Cyber Security
                    2.  Who designed Python and when was it released?
                       a.  James Gosling, 1995                         b.  Bjarne Stroustrup, 1985
                       c.  Guido van Rossum, 1991                      d.  Dennis Ritchie, 1972

                    3.  Which punctuator in Python is used to separate items?
                       a.  ,                                           b.  :
                       c.  ( )                                         d.  [ ]
                    4.  Which command is used to install Jupyter Notebook if Python is already installed?
                       a.  pip install jupyterlab                      b.  pip install --user notebook
                       c.  python install notebook                     d.  python -m pip notebook
                    5.  Which Python library is used to display the current date and time?
                       a.  Time                                        b.  Calendar
                       c.  Datetime                                    d.  Math

                 B.  Fill in the blanks.
                    1.  Python uses an ………………… where the source code is converted and executed line by line at a time.
                    2.  PyCharm also includes tools for viewing data, running tests and working with ………………… environments.
                    3.  Python is popular for its …………………, adaptable nature and strong capabilities.
                    4.  Identifiers are ………………… names that help programmers store data and perform operations.
                    5.  A string ………………… is usually written inside single quotes (' ').

                 C.  Answer the following questions:
                    1.  What is meant by portability and compatibility in Python?
                    2.  Explain what it means when Python is called a dynamically typed language.




                                                               Installation & IDE and Fundamentals of Python Programming  433
   430   431   432   433   434   435   436   437   438   439   440