0

i'm a new comer to this language. can anybody tell me why this simple piece of code gives me an error indicating that "NameError,name 'example' is not defined". by the way i use Wing IDE to write my codings.

class example():
def _init_ ():
print("a class is created")

def m1 ():
print("a method")

ex1 = example()
ex1.m1()

pls help me out

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by woooee
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.