Read this guideline before completing the task:
Guideline
- You have to make a class
Cat
that represents a cat. - The class takes arguments
name
andage
for create an example of class. - Also, the class must also have
info
andvoice
methods. - The
info
method must return a dictionary with two keys:"cat": {cat's name}
and"age": {cat's age}
- The
voice
method must return a string
{cat's name}: Meow!
Example:
bob = Cat("Bob", 5)
print(bob.name) # "Bob"
print(bob.age) # 5
print(bob.info()) # {"cat": "Bob", "age": 5}
print(bob.voice()) # "Bob: Meow!"
Run command pytest
in terminal
before pushing solution