Fruitful Function: Function that returns a value
def power(x,y): for i in range(y): r=r*x print(r) a=intinput((“Enter Base”)) b=intinput((“Enter Exponent”)) power(a,b)
Non-Fruitful Function: Function that does not return any value.
def power(x,y=3): for i in range(y): r=r*x return r a=intinput((“Enter Base”)) b=intinput((“Enter Exponent”)) total = power(a,b) print(total)