Page 387 - Computer Science Class 11 Without Functions
P. 387

Viva Voce Questions








               1.  What are the key features of Python programming?
             Ans.  Python is a versatile and widely-used programming language known for its simplicity and readability. It has
                  many key features that make it popular among developers for a variety of applications. Here are some of the key
                  features of Python programming:
                  1. Extensive Standard Library
                  2. Dynamic Typing
                  3. Open Source
                  4. Object-Oriented
               2.  What is IDLE?
             Ans.  IDLE (Interactive Development and Learning Environment) is an environment for developing Python programs
                  (“scripts”).
               3.  What are the two modes of working in Python?
             Ans.  Python provides two modes of working:
                  a.  Interactive mode
                  b.  Script mode

               4.  List primitive data types in Python.
             Ans.  The primitive data types in Python are: integer, float, string, and boolean.
               5.  Is string a sequence data type?
             Ans.  Yes, a string is a sequence data type in Python programming.
               6.  What is the purpose of input() method?

             Ans.  The purpose of the input() method in Python is to take user input from the keyboard and store it as a string
                  for further processing in a program.

               7.  How the values are printed if we do not use the sep option of print() function?
             Ans.  If you don't use the sep option with the print() function in Python, it will print the specified values separated
                  by a space by default.
               8.  What are the different types of operators in Python?
             Ans.  Python has several types of operators, including:
                  1. Arithmetic Operators: Perform mathematical operations (e.g., +, -, *, /, %, //, **).
                  2. Comparison Operators: Compare values and return Boolean results (e.g., ==, !=, <, >, <=, >=).
                  3. Logical Operators: Perform logical operations on Boolean values (e.g., and, or, not).
                  4. Assignment Operators: Assign values to variables (e.g., =, +=, -=, *=, /=, %=, //=, **=).
                  5. Membership Operators: Check for membership in a sequence (e.g., in, not in).

               9.  Why do we use the modulo (%) operator?
             Ans.  The modulo operator (%) in Python is used to find the remainder of a division operation between two numbers.
                  It returns the remainder of the division of the first number (the dividend) by the second number (the divisor).
                  For example, 5%2 shall return the result as 1, remainder obtained when we are dividing 5 by 2.

              10.  Which operators are used to compare the values of operands?
             Ans.  Relational operators.


                                                                                            Viva Voce Questions  385
   382   383   384   385   386   387   388   389   390   391   392