Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

given is a code snippet in python : import sys class mammal : def _init_(self) : self.legs = 4 self.face = (2,2,1) def speak (self)

given is a code snippet in python :

import sys

class mammal :

def _init_(self) :

self.legs = 4

self.face = (2,2,1)

def speak (self) :

pass

class dog (mammal) :

def speak (self) :

print "I bark"

class cat (mammal) :

def speak (self) :

print "I purr"

class pig (mammal) :

def speak (self) :

print "I grunt"

class tiger (cat) :

def speak (self) :

print "I roar"

class man (dog,cat,pig,tiger) :

pass

___________________________

Question - modify the code such that man will have 2 ears, 2 eyes, 1 nose, 2 legs, 2 hands and is able to speak like other mammals as well as should talk, i.e, Man should speak : I bark I purr I grunt I roar I even talk.

PLEASE INCLUDE ALL THE STEPS AND EXPLAIN THE ANSWER IN DETAIL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

Explain intraperiod income tax allocation and why it is important.

Answered: 1 week ago

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago