Question: Modify your original program to import the functions from the file you just created and get everything working properly. #create class Shirt class Shirt: #constructor

Modify your original program to import the functions from the file you just created and get everything working properly.

#create class Shirt class Shirt: #constructor for initializing attributes of class def __init__(self,size,color): self.size=size self.color=color #print attributes of class def printAttributes(self): print("Size is "+str(self.size)) print("Color is "+self.color) #create instance of Shirt class shirt1=Shirt(35,"blue") print("Size is "+str(shirt1.size)) print("Color is "+shirt1.color) shirt1.printAttributes() shirt2=Shirt(40,"green") print("Size is "+str(shirt2.size)) print("Color is "+shirt2.color) shirt2.printAttributes()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!