🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

What will be the output of the following Python code ?

def sayHello():
           print("Hello World!‟)
sayHello()
sayHello()
A)
B)
C)
D)

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!

Latest Updates