Class - 12 CBSE Computer Science Important Output Questions 2025
What will be the output of the following program?
def display():
print ("Hello",)
display()
print("bye!")
Python
Python Functions
1 Like
Answer
Hello
bye!
Working
def display():— This line defines a function nameddisplaywith no parameters.print("Hello",)— Inside thedisplayfunction, it prints the string "Hello".display()— This line calls thedisplayfunction, which then prints "Hello" due to the print statement inside the function.print("bye!")— This line prints "bye!" on a new line.
Answered By
2 Likes