Discover answers to your questions with Westonci.ca, the leading Q&A platform that connects you with knowledgeable experts. Connect with professionals on our platform to receive accurate answers to your questions quickly and efficiently. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

You defined a shoe data type and created an instance.
class shoe:
size = 0
color = 'blue'
type = 'sandal'
myShoe = shoe()
Which statement assigns a value to the type?
type = 'sneaker'
myShoe.type( 'sneaker')
myShoe.type = 'sneaker'
NEXT QUESTION
ASK FOR HELP


Sagot :

Answer:

myShoe.type = 'sneaker'

Explanation:

type is a field of the class shoe. The myShoe object which is an instance of the class shoe has the field type also.

To assign a value to type filed of the object myShoe, reference the object then the field as such;

   myShoe.type = "sneaker"