Computer Science
What will be the output of following program ?
def display():
print("Hello", end='')
display()
print("there!")
Related Questions
What will be the output of following program ?
num = 1 def myfunc(): num = 10 return num print(num) print(myfunc()) print(num)
What will be the output of following program ?
num = 1 def myfunc(): global num num = 10 return num print(num) print(myfunc()) print(num)
Predict the output of the following code :
a = 10 y = 5 def myfunc(): y = a a = 2 print("y =", y, "a =", a) print("a + y =", a + y) return a + y print("y =", y, "a =", a) print(myfunc()) print("y =", y, "a =", a)
What is wrong with the following function definition ?
def addEm(x, y, z): return x + y + z print("the answer is", x + y + z)