Page 69 - PYTHON-11
P. 69
12. What will be the output of the following code? [1]
from math import floor
print(floor(9.8))
(a) 9.8 (b) 10.0 (c) 10 (d) 9
13. What is the result of the following code? [1]
t = (15,)
print(type(t))
(a) <class 'list'> (b) <class 'int'> (c) <class 'tuple'> (d) <class 'set'>
14. What is the result type of the expression: [1]
12 / 3
(a) int (b) float (c) str (d) bool
15. Select the output of the following code. [1]
text = "HelloTechnoWorld"
print(text[-8:-1])
(a) hnoWorl (b) lorWonh (c) ceTolleH (d) hno
16. Which of the following is NOT a cybercrime under the IT Act 2000? [1]
(a) Sending spam emails (b) Unauthorized access to computer systems
(c) Creating computer viruses (d) Watching online educational videos
17. Which one of the following helps in protecting digital identity? [1]
(a) Using easy passwords
(b) Sharing OTPs with friends
(c) Keeping strong, unique passwords and enabling 2FA
(d) Posting personal details online
18. Select the correct output of the following code. [1]
d = {'x': 5, 'y': 10}
val = d.pop('x')
print(val)
(a) 5 (b) x (c) 10 (d) Error
19. Observe the following code and select the correct output. [1]
t = (10, (20, 30), 40)
print(t[1].index(30))
(a) 0 (b) 30 (c) 1 (d) Error
Q. 20 and Q. 21 are Assertion (A) and Reasoning (R) based questions. Mark the correct choice as:
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.
20. Assertion (A): The append() method can be used with tuples. [1]
Reasoning (R): Tuples are similar to lists in Python.
21. Assertion (A): Digital footprint is the data trail left by users on the Internet. [1]
Reasoning (R): Visiting a website or liking a post creates a digital footprint.
Section B (7 × 2 = 14 Marks)
22. Draw a logic circuit for the following expression: [2]
(U+ V)' • W'
P.2