Question: (PYTHON) Please make sure the code runs with no errors and an example would be helpful. Thank you!! Instructions Create a class named Person, use
(PYTHON) Please make sure the code runs with no errors and an example would be helpful. Thank you!!

Instructions Create a class named Person, use the _init_() function to assign values for name and age class Person: def_init_(self, name, age): p1 = Person("John", 36) print(p1.name) print(p1.age) 2. Insert a function that prints a greeting, and execute it on the p1 object class Person: def_init_(self, name, age): self.. name = name self.age = age p1 = Person("John", 36) p1.myfunc()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
