निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def sayHello():
print("Hello World!‟)
sayHello()
sayHello() A
Hello World! Hello World!
B
"Hello World!‟ "Hello World!‟
C
Hello Hello
D
None of the above
Explanation
The code has a small typo in the print statement. Specifically, the closing quotation mark for the string "Hello World!" is incorrectly written as a special character ‟ instead of a standard double quote ".
Here’s the corrected version of the code:
def sayHello():
print("Hello World!")
sayHello()
sayHello()
Now, if the code is corrected, the output will be:
Hello World!
Hello World!
Correct Answer: (A) Hello World! Hello World!
Correct Answer: A) Hello World! Hello World!