Class 12 – CS – Code 083 – Computational Thinking and Programming – 2 Assessment Questions with Solution

Important Questions for Class 12 Computer Science (Python) – Revision of Python topics covered in Class 11

Updating in progress…

Q.1 Name the Python Library modules which need to be imported to invoke the following functions : [CBSE Delhi 2016]
a) load ()
b) pow ()

Answer: a) pickle
b) math

Q.2 Name the modules to which the following functions belong: [CBSE SQP 2016]
a) Uniform ()
b) fabs ()

Answer: a) random ()
b) math ()

Q.3 Differentiate between the round() and floor() functions with the help of suitable example. [CBSE Compartment 2016]

Answer: The function round() is used to convert a fractional number into whole as the nearest next whereas the function floor() is used convert to the nearest lower whole number.
example: round (5.8) = 6, round (4.1) = 5 and floor (6.9) = 6, floor (5.01) = 5

Q.4 Out of the following, find those identifiers, which cannot be used for naming Variables or functions in a Python program:
Total * Tax, While, Class, Switch, 3rd Row, finally, Column 31, Total. [CBSE Outside Delhi 2016]

Answer: Total * Tax, class, 3rd Row, finally

Q.5 Name the function / method required for: [CBSE SQP 2015]
a) Finding second occurrence of m in madam.
b) get the position of an item in the list.

Answer: a) find
b) index

Leave a Comment