Aug-28-2020, 06:40 AM
Hi,
I am trying to run this code. Somehow it shows " Run constructors" instead of the line " Hallo daar!". What am i doing wrong?
Any input is much appreciated!
I am trying to run this code. Somehow it shows " Run constructors" instead of the line " Hallo daar!". What am i doing wrong?
Any input is much appreciated!
1 2 3 4 5 6 7 8 |
class MyClass: Greeting = "" def __init__( self , Name = "daar" ): self .Greeting = Name + "!" def SayHello( self ): print ( "Hallo {0}" . format ( self .Greeting)) |
1 |
>>> % Run constructors.py |