def xyz(p1, 'hello'):
print(p1)
Exercises: where are the errors?
- What are the problems in the following code and how can we correct them?
- PS: printing a value in a function is not the same thing as returning it
- What is the difference between printing and returning?
- Now, repeat with these (point error and correct it):
= int(input())
x1 = int(input())
x2 = add(x1, x2)
res print("The sum is: ", res)
def add(a, b):
= a + b
c return c
def fun(x):
print(x, end=' ')
-1)
fun(x
10) fun(