Wednesday, August 2, 2023

Unit Test - 01 Class 12 - 03 Aug

 

Test - 01



1. What is Function? Explain types of functions with example.                        04 Marks

2. What is argument? Explain types of arguments with example.                    05 Marks

3. What is the difference between actual and formal parameter?                    02 Marks

4. True/False                                                                                                           05 Marks

(a) Positional arguments must be written before keyword arguments.

(b) The values of default arguments must be passed from the calling function.

(c) Variable length argument values assign as a tuple in the function definition.

(d) Function is a part of program with perform a specific task

(e) The values which is passed at the function calling are called function arguments.

5. Write the output of the following code.                                                            04 Marks

(a) 

L = [1, 5, 8, 6, 9]

print(L[3])

(i) 8            (ii) 6                (iii) 3                    (iv) None of these


(b)

T1 = (1, 2)

T2 = (3, 4)

print (T1+T2)


(i) (1, 2, 3, 4)            (ii) (4, 6)                (iii) Error                    (iv) None of these


(c) 

D = {1:10, 2: 20, 3: 30, 1:40}

print(D.keys())


(i) dict_keys([1, 2, 3])           (ii) [1, 2, 3]                (iii) (1, 2, 3)                     (iv) None of these

(d)

S="Hello India"

print(len(S))

(i) 11                (ii) 10                (iii) 5                 (iv) None of these

No comments:

Post a Comment