QUESTION IMAGE
Question
question # 2
multiple choice
which line correctly starts the definition of a class named \team\?
def team:
class team:
def team():
class team():
In Python, the keyword 'class' is used to define a class. The correct syntax for starting the definition of a class named "team" is "class team:". The parentheses are used for inheritance or method/function calls (in the case of 'def' for functions). Here, no inheritance is indicated and we are just defining a basic class, so no parentheses are needed after the class name.
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
class team: