Oct-23-2023, 03:59 PM
(This post was last modified: Oct-23-2023, 03:59 PM by deanhystad.)
If you have a question, create a new post. Don't post your question as a reply to an existing post.
You create a class named Dog, then you create a different class and name it Dog. Finally you create yet a third class named Dog. If you want to create an instance of Dog and call the Dog methods, stop making new Dog classes.
You create a class named Dog, then you create a different class and name it Dog. Finally you create yet a third class named Dog. If you want to create an instance of Dog and call the Dog methods, stop making new Dog classes.
#Making an Instance from a Class my_dog = Dog('Atos', 8) print("My dog name is " + my_dog.name.title() + ".") print("My dog is " + str(my_dog.age) + " years old.") my_dog.sit() my_dog.roll_over()