please code in python
Answer the following questions about this Dog class:[refer image for dog class]
1. Construct an instance of the Dog class whose name is Snickers and was born in2011 and assign that instance to a variable called myDog.2. Call the bark method so that myDog barks 3 times.3. Add a method to the Dog class called isPuppy that returns True if the dog is lessthan 1 year old.4. Add the __str__ method to the Dog class. It should return a string that includesthe dog’s name and age.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here