0
range question plz explain this question and its solution
3. Write a program that prints following shape, (Hint: Use for loop inside another for loop) * ** *** **** *****
4 Antworten
+ 1
Thanks @swim
0
for i in range(1,6):
s = "*"
for j in range(i):
s += '*'
print(s)
i did the solution but showing some unexpected result. As we know the range exclude the end point but i am getting the result with end point. pla explain.
my result is:
**
***
****
*****
******