Write a module named dog
which has a class named Dog
with
name
breed
name
and breed
parameters and uses them to initialize the instance variables'Chloe the Doberman'
When your dog
module is run as a script, it should use the first two command line arguments to your script to pass as the name and breed in the construction of an instance of Dog
, then print the Dog
instance using the print
function. When the dog
module is imported as a module, it should not print anything. For example:
>>> import dog
>>> d = dog.Dog("Dante", "Deutscher Schäferhund")
>>> d
Dante the Deutscher Schäferhund
>>> quit()
$ python dog.py Chloe Doberman
Chloe the Doberman