Question

Consider this program:

class Students:

def __init__(self, name, grade):

self.name = name

self.grade = grade



student34 = Students("Maria", 10)

student35 = Students("Jane", 9)

print(student35.grade)

What is the output?

(1 point)
Responses

10

10

9

9

Jane

Jane

student35

student35
Skip to navigation

1 answer

The output of the given program is 9.

When you create the instance student35 of the class Students with the name "Jane" and grade 9, and then print student35.grade, it outputs the value of grade associated with that instance, which is 9.

So the correct response is:

9