QUICK 100!!!!
What is the scope of the variable hardness?

class pencil:
color = 'yellow'
hardness = 2
class pencilCase:
def __init__(self, color, art):
self.color = 'black'
self.art = 'wolf'
def __str__(self):
return self.color + " " + self.art
# main part of the program
pencilA = pencil()

limited to the pencilCase class
limited to the pencilCase class

accessible to all parts of the program
accessible to all parts of the program

limited to the pencil class
limited to the pencil class

limited to the main part of the program

Q&A Education