Untitled

Anonymous
plain_text
12/17/2023 3:06 PM
384 B
16
Indexable
class Cat:
    def __init__(self, name):
        self.name = name

    def kiss(self):
        return f"{self.name} gives a sweet kitty kiss!"

# Create a cat instance
my_cat = Cat("Whiskers")

# Call the kiss method
kiss_message = my_cat.kiss()

# Print the result
print(kiss_message)
Editor is loading...
Leave a Comment