Determine the output of the following program:
def fun1(a=2,b=10):
c=a+b
a=b
b=c
c=a+b
return(c)
x=10
y=20
x=fun1(y)
print(x,y)
y=fun2(x,y)
print(x,y)
Answers
Answered by
2
Answer:
x and y are equal
Description : if (x == y) here we are comparing if (10 == 10.0) hence this condition is satisfied. Because we cannot compare int
and float so the int is converted to float and then compared. Hence it prints “x and y are equal”.
Similar questions
Social Sciences,
4 months ago
English,
4 months ago
Physics,
4 months ago
Math,
9 months ago
English,
9 months ago
Physics,
1 year ago
Social Sciences,
1 year ago