Animal CLass Implementation

Define a class called "Animal" and implement a method called "set_identity" that sets the name of the Animal. Then create an instance of the "Animal" class, call the "set_identity" method with the argument "Dog", and print the value of the "name" attribute of the animal object.

Note:Give the input in the code itself

Expected output:Dog
Total : 0 Discussion
Login