1. What is the assignment operator in Python? A. == B. = C. := D. >< Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: The assignment operator in Python is =.
2. Which of the following is not a keyword? A. eval B. assert C. nonlocal D. pass Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
3. Which of the following is a valid variable name in Python? A. my-variable B. 123variable C. _my_variable D. $variable Answer & Solution Discuss in Board Save for Later 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? A. 31 characters B. 63 characters C. 79 characters D. none of the mentioned Answer & Solution Discuss in Board Save for Later 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? A. ^ B. ** C. ^^ D. // Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: The ** operator is used for exponentiation in Python.
6. What is the result of 'True and False' ? A. True B. False C. None D. Error Answer & Solution Discuss in Board Save for Later 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' ? A. True B. False C. None D. Error Answer & Solution Discuss in Board Save for Later 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' ? A. True B. False C. None D. Error Answer & Solution Discuss in Board Save for Later 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? A. Checks if two values are equal B. Checks if a value is greater than another C. Checks if a value is in a sequence D. Checks if a value is not in a sequence Answer & Solution Discuss in Board Save for Later 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? A. Checks if two values are equal B. Checks if a value is greater than another C. Checks if a value is not in a sequence D. Checks if a value is in a sequence Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: The not in operator checks if a value is not present in a sequence.