Westonci.ca is the best place to get answers to your questions, provided by a community of experienced and knowledgeable experts. Discover in-depth solutions to your questions from a wide range of experts on our user-friendly Q&A platform. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

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"