Generation

generate functionSun, 13 Nov 2022

function to store attributes for an object

class Person: def __init__(self, name, age): self.name = name self.age = age def myfunc(self): print("Hello my name is " + self.name) p1 = Person("John", 36) p1.myfunc()

Want to kickstart your project?Use the new AI Studio to create your code