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
question: 19
which of the following choices is not a python variable type?
int
str
float
number

Explanation:

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:

  • int is the integer variable type.
  • str is the string variable type.
  • float is the floating - point variable type.
  • There is no built - in variable type named number (Python has int, float, complex for numeric types).

Answer:

user_age

Question 19