Page 299 - Computer Science Class 11 With Functions
P. 299
b. BLUE
BLUEPINK
BLUEPINKGREEN
BLUEPINKGREENRED
c. PINK
PINKGREEN
GREENRED
d. BLUEBLUE
PINKPINK
GREENGREEN
REDRED
5. Which of the following is NOT a function of statistics module?
a. mean() b. median() c. floor() d. mode()
6. Which of the following is True about trigonometric functions in Python?
a. They are defined in trigonometry module.
b. cos() takes a positive integer or floating point number in radians as an input.
c. sin() takes a positive integer or floating point number in degrees as an input.
d. tan() returns the arc tan value in degrees.
7. Which of the following is false about functions defined in random module?
a. random() enables us to generate a random number between 0 and 1.
b. randint(p, q) generates random numbers between p and q, both inclusive.
c. randrange(p, q) generates random numbers between p and q, both exclusive.
d. randrange(p, q) generates random numbers between p and q, only q exclusive.
8. Which of the following functions from statistics module will return the most frequently occurring value in a list?
a. mean() b. mode() c. median() d. frequent()
9. Which of the following function header is correctly defined?
a. def test(a=10, b=20, c):
b. def test(a=10, b, c=30):
c. def test(a, b=20):
d. def test(a=30, b, c):
10. Which of the following statements is not true with respect to functions in Python?
a. By default, the arguments in a function call are specified in the same sequence as in the formal parameter list.
b. Python allows us to specify the input arguments to a function in an arbitrary order by explicitly associating the names
of the formal parameters with their values
c. When a user specifies the values of the default parameters, the default values are ignored.
d. The values assigned to the formal parameters during the function call, are called the default values of the parameters.
B. State whether the following statements are True or False:
1. A Python module is a file comprising Python code. __________
2. import keyword is used to import a specific function into a Python program. __________
3. pow() is defined in math module. __________
4. All default parameters (if any) should precede the non-default parameters. __________
5. A function can be passed as an argument to another function. __________
Modules 297

