print(f(start=1, end=3))
# => square of 1 is 1
# => square of 2 is 4
# => square of 3 is 9
def f(start, end):
end = end + 1
for i in range(start, end):
count = start ** 2
result = f'{'square of'} {str(start)} {'is'} {str(count)}'
return result
print(f(start=1, end=3))
def f(start, end):
end = end + 1
result = '' # +++
for i in range(start, end):
# count = start ** 2
# result = f'square of {str(start)} is {str(count)}'
count = i ** 2 # + i
result += f'square of {i} is {str(count)}\n' # + += / i / \n
return result