Question: Write a class named Marsupial that can be used as shown below: >>> m=Marsupial (red) >>> m.put_in_pouch ('doll') >>> m.put_in_pouch ('firetruck') >>> m.put_in_pouch ('kitten')
>> m.put_in_pouch">
Write a class named Marsupial that can be used as shown below: >>> m=Marsupial ("red") >>> m.put_in_pouch ('doll') >>> m.put_in_pouch ('firetruck') >>> m.put_in_pouch ('kitten') >>> m.pouch_contents() ['doll', 'firetruck', 'kitten'] >>> print (m) I am a red Marsupial.
Step by Step Solution
3.51 Rating (151 Votes )
There are 3 Steps involved in it
To solve the problem in the image we can create a Python class called Marsupial with the following attributes and methods Python class Marsupial def i... View full answer
Get step-by-step solutions from verified subject matter experts
