Page 345 - AI Ver 1.0 Class 10
P. 345

15.  (0,0,255), (255,0,0), (0,255,0), (0,0,0), (255,255,255). The given pixel combination will make which colors?

                   Ans. (0,0,255) = Blue
                               (255,0,0) = Red
                               (0,255,0) = Green
                               (0,0,0) = Black
                               (255,255,255) = White
                    16.  What are conditional statements?
                   Ans.  Conditional statements are used for selecting the block of statements to be executed based on the condition. We
                       specify the condition in the program which evaluates to either True or False.
                    17.  Give two different ways of giving comments in Python.

                   Ans.  Single Line Comments: Starts with a hash symbol ‘#’ followed by the text to be written as a comment that lasts till the
                       end of the line.
                       Multi Line Comments: When we add up comments which occupy two or more lines then we begin the comment with
                       either 3 times single quotes ‘'' or double quotes ""“, followed by text on multiple lines and end with 3 times single
                       quotes ‘'' or double quotes “““to mark the end of the comment.

                    18.  What are keywords? Give examples.
                   Ans.  Keywords have special meaning which are reserved by Python for special purposes and are not allowed to be used as
                       identifiers. They are case sensitive.
                    19.  What is Anaconda?
                   Ans.  Anaconda is a popular, free and open-source distribution of Python and R for Windows, Linux, and macOS. It gives you
                       the facility of working on all Domains of AI at one place by installing many packages with a single installation process.

                    20.  What are modules? Give examples.
                   Ans.  A Python module is a file containing Python definitions and statements. A module can define functions, classes, and
                       variables. A module can also include runnable code. Examples are NumPy, Pandas etc.
                    21.  Why do we use the NumPy package?
                   Ans.  NumPy can be used to perform a wide variety of mathematical operations on arrays.

                    22.  Give two differences between NumPy-Arrays and Python-Lists.
                   Ans.  A list cannot directly handle a mathematical operation, while arrays can.
                       A list is easier to modify as compared to arrays.
                    23.  Differentiate between the = and == operators used in Python.

                   Ans.  The ‘=’ operator is used to assign value to a variable whereas ‘==’ operator is used to compare two values.
                    24.  What are box plots in matplotlib?
                   Ans.  A box plot which is also known as a whisker plot displays a summary of a set of data containing the minimum, first
                       quartile, median, third quartile, and maximum.
                    25.  What are outlier data and which graph is best to plot it using matplotlib?

                   Ans.  Outliers are extreme observations in the dataset. So a rule to determine if a data point is extreme is to compare it
                       against the interquartile range.










                                                                                       Viva Voce Questions  343
   340   341   342   343   344   345   346   347   348   349   350