Question: 11 -
Which of the following statements is correct for variable names in Python language?
-
All of the above
-
Unlimited length
-
All variable names must begin with an underscore.
-
The variable name length is a maximum of 2.
Answer:
Unlimited length
Solution not available.
Question: 12 -
Which of the following is not a keyword in Python language?
-
try
-
with
-
val
-
raise
Answer:
val
Solution not available.
Question: 13 -
Which of the following operators is the correct option for power(ab)?
-
a ^ ^ b
-
a ^ b
-
a ^ * b
-
a**b
Answer:
a**b
Solution:
The power operator in python is a**b, i.e., 2**3=8.
The power operator in python is a**b, i.e., 2**3=8.
Question: 14 -
Which of the following declarations is incorrect in python language?
-
x,y,z,p = 5000, 6000, 7000, 8000
-
x_y_z_p = 5,000,000
-
xyzp = 5,000,000
-
x y z p = 5000 6000 7000 8000
Answer:
x y z p = 5000 6000 7000 8000
Solution:
Spaces are not allowed in variable names.
Spaces are not allowed in variable names.
Question: 15 -
Which of the following words cannot be a variable in python language?
-
val
-
try
-
_try_
-
_val
Answer:
try
Solution:
"try" is a keyword.
"try" is a keyword.