asked 68.3k views
2 votes
Which of the following identifiers follows the naming convention for a Python constant? A) max_penalties B) maxpenalties C) maxpenalties D) max_penalties

1 Answer

3 votes

Answer:

A) max_penalties

Step-by-step explanation:

In Python, constants are typically named using uppercase letters and underscores to separate words, following the naming convention known as "snake_case." So, the identifier that follows the naming convention for a Python constant is:

A) max_penalties

Option A uses the underscore (_) to separate words and is written in lowercase letters, which is consistent with the snake_case convention for constants in Python.

answered
User Freya
by
7.7k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.