Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question: 18 which of the following choices is a properly formed python…

Question

question: 18
which of the following choices is a properly formed python variable name, meaning it is both legal in the python
language and considered good style?
user_age
userage
user!age!
1user_age

Explanation:

Brief Explanations
  • In Python, variable names can only contain letters, numbers, and underscores. They cannot start with a number. So 1user_age is invalid.
  • Variable names should follow naming conventions. In Python, the snake_case (lowercase letters with underscores separating words) is considered good style. uSeRaGe (camelCase) is not the preferred style in Python (though it is a legal variable name). user!age! has invalid characters (!). user_age is in snake_case and has only valid characters.

Answer:

user_age