Start på pass 2
This commit is contained in:
12
Pass2/OOP basics.py
Executable file
12
Pass2/OOP basics.py
Executable file
@@ -0,0 +1,12 @@
|
||||
class MyClass:
|
||||
#My first class
|
||||
i = 12345
|
||||
str = "Something"
|
||||
|
||||
def myFunc(self):
|
||||
return 'hello world'
|
||||
|
||||
x = MyClass()
|
||||
print(x.i)
|
||||
print(x.str)
|
||||
print(x.myFunc())
|
||||
Reference in New Issue
Block a user