ExamVeda
Login
Home
1
What is the assignment operator in Python?
Discuss
Answer & Solution
Answer: Option B
Solution:
The assignment operator in Python is =.
2
Which of the following is not a keyword?
Discuss
Answer & Solution
Answer: Option A
Solution:
In Python, keywords are reserved words that have special meaning and cannot be used as identifiers (variable names, function names, etc.). The Python language defines a specific set of keywords that are used for various programming constructs.

Let's analyze each option:

Option A: "eval" - This is not a keyword in Python. "eval" is a built-in function that evaluates a Python expression from a string and returns the result.

Option B: "assert" - This is a keyword in Python used for debugging purposes to test assertions.

Option C: "nonlocal" - This is a keyword in Python used to declare that a variable inside a nested function or lambda function is not local to it, meaning it should be looked up in the enclosing scope.

Option D: "pass" - This is a keyword in Python used as a placeholder indicating that no action is to be taken.

Therefore, the correct answer is Option A: eval.
3
Which of the following is a valid variable name in Python?
Discuss
Answer & Solution
Answer: Option C
Solution:
Variable names can start with an underscore _ or a letter.
4
What is the maximum possible length of an identifier?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
5
Which operator is used for exponentiation in Python?
Discuss
Answer & Solution
Answer: Option B
Solution:
The ** operator is used for exponentiation in Python.
6
What is the result of 'True and False' ?
Discuss
Answer & Solution
Answer: Option B
Solution:
The and operator returns False if any of its operands is False.
7
What is the result of 'not True' ?
Discuss
Answer & Solution
Answer: Option B
Solution:
The not operator returns the opposite of its operand's boolean value.
8
What is the result of 'True or False' ?
Discuss
Answer & Solution
Answer: Option A
Solution:
The or operator returns True if at least one of its operands is True.
9
What does the 'in' operator do in Python?
Discuss
Answer & Solution
Answer: Option C
Solution:
The in operator checks if a value is present in a sequence.
10
What does the 'not in' operator do in Python?
Discuss
Answer & Solution
Answer: Option C
Solution:
The not in operator checks if a value is not present in a sequence.