What Will Be The Output Of The Following Code?
def __init__(self, s = "Welcome"):
self.s = s
msg = Test()
The program has an error because the constructor is not present in class Test.
The above code produces an error because the definition of print(s) does not contain.
It executes successfully but prints nothing.
The program has an error because of the constructor call is made without an argument.
The program executes successfully and prints Welcome.
© 2017 QuizBucket.org