20. [20] Complete the function g only using if (without elif or else) so that its output is the same as f.
1
2
def f(a,b,c,x):
3 if a and not b:
4 return x + 1
5 elif b or c:
6 return x-1
7 else:
8 return x+10
10
11
def g(a, b, c,x):
12 #TO DO
13 i = [0,11
14 for a in i:
15 for b in i:
16 for c in i:
17 print (f(a,b,c, 1), " ", g(a,b,c,1))
Output
10 10
0 0
0 0
0 0
2 2
2 2
0 0
0 0