QUESTION IMAGE
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
question: 19
which of the following choices is not a python variable type?
int
str
float
number
Question 18
Brief Explanations
In Python, variable names must start with a letter or underscore, followed by letters, numbers, or underscores. Good style (PEP 8) recommends using lowercase with underscores for multi - word names (snake_case).
user_age: Follows the rules (starts with letter, uses underscore for multi - word) and is in snake_case (good style).uSeRaGe: While it is a legal variable name (starts with letter, has letters), it does not follow PEP 8 naming convention (should be snake_case).user!age!: Contains an illegal character (!).1user_age: Starts with a number (illegal).
Brief Explanations
In Python:
intis the integer variable type.stris the string variable type.floatis the floating - point variable type.- There is no built - in variable type named
number(Python hasint,float,complexfor numeric types).
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
user_age