Q: Is Python case sensitive when dealing with identifiers?
Solution: Case is always significant.
Q: What is the maximum possible length of an identifier?
Solution: Identifiers can be of any length.
Q: Which of the following is invalid?
Solution: All the statements will execute successfully but at the cost of reduced readability.
Q: Which of the following is an invalid variable?
Solution: Variable names should not start with a number.
Q: Why are local variable names beginning with an underscore discouraged?
Solution: As Python has no concept of private variables, leading underscores are used to indicate variables that must not be accessed from outside the class.
Q: Which of the following is not a keyword?
Solution: eval can be used as a variable.
Q: All keywords in Python are in _________
Solution: True, False and None are capitalized while the others are in lower case.
Q: Which of the following is true for variable names in Python?
Solution: Variable names can be of any length.
Q: Which of the following is an invalid statement?
Solution: Spaces are not allowed in variable names.
Q: Which of the following cannot be a variable?
Solution: in is a keyword.
You Have Score    | /10 |