Python Basic Assessment _1
Python Basic Assessment _1
Q1. In Python, the combination of operators and operands is called a/an ___________.
(a Operation (b) Expression (c) Statement (d) Loop
Q2. A variable pointing to a certain type can be made to point to different type is known
as___________.
(a) Static typing (b) Dynamic typing (c) Statement (d) Expression
Q10. What will be the output for the following Python statement?
T=(10,20,[30,40,50],60,70)
T[2][2]=100
print(T)
(a) (10,20,100,60,70) (b) (10,20,[30,40,100],60,70)
(c) (10,20,[30,40,50],60,70) (d) None of these
Q11. Which of the following is an unordered collection of elements
(a) List (b) Tuple (c) Dictionary (d) String
Q22. Identify the correct output(s) of the following code from the given options.
import random
s= “Knowledge”
n=random.randint(3,7)
for i in range(0,n,3):
print(s[i],end=’*’)
Q23. A________ represents labeled storage locations, whose values can be manipulated
during program execution.
(a) constant (b) variable (c) expression (d) control statement
Q24. The return type of the input() function is
(a) string (b) integer (c) list (d) tuple
Q25. Find the statement that raises an error when the following program is executed:
d= {
“flower”: Rose” ,
“Color” : Pink”,
}
del d
print(d)
( a) Statement 1 (b) Statement 3 (c) Statement 5 (d) Statement 6