80,697 views
45 votes
45 votes
Maria is writing a program to design t-shirts. Which of the following correctly retrieves the values for a t-shirt object's pattern?

newStyle.pattern
newStyle + pattern
newStyle = pattern
newStyle(Pattern):

User GrafikRobot
by
2.3k points

1 Answer

9 votes
9 votes

Answer:

newStyle.pattern

Step-by-step explanation:

example:

class Style:

def __init__(self, pattern=""):

def design():

newStyle = Style (this allows the user to user newStyle to access all values in the class Style)

now that you have this, you can call the pattern attribute

newStyle.pattern

you can also set this equal to a new value here but for the sake of this question your answer is newStyle.pattern

hope this made sense and helped you out! :)

User MarkPlewis
by
2.5k points