I = 1
while I < = 5:
result = 1
while result <= i:
print("*", end="")
result += 1
print(" %d " % i)
print("")
i += 1
1. Why is the while (result) loop nested in the box whose variables start at 1 every time?
2. While the while (I) cycle only judges once at a time? That is, the cumulative value from I + = 1?
I just started to learn python. I"m a little confused here. I beg you to give me some advice. Thank you in advance.
I and result
11 < = 1
21 < = 2,2 < = 2
31 < = 3,2 < = 3,3 < = 3,
41 < = 4,2 < = 4,4 < = 4,
51 < = 5,2 < = 5,3 < = 5,4 <, 5 < = 5