Answer the question
In order to leave comments, you need to log in
How to return the desired value?
For n = 2 it returns:
x
x
Need to return:
x
xx
The function is as follows:
def sq(n):
for i in range(1, n + 1):
# print(i * 'x')
z = i * 'x' + '\n'
return z*n
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question