+ 1
Stuck on Python Code
Increase and Decrease print()
5 ответов
+ 3
i = 1
while 1 == 1:
print("*" * i)
i += 1
if i >= 10:
break
while 1 == 1:
print("*" * i)
i -= 1
if i <= 0:
break
+ 1
i = 1
while 1 == 1:
print("*" * 1)
i += 1
if i >= 10:
break
i = 10
while 1 == 1:
print("*" * 1)
i -= 1
if <= 1:
break
0
I am trying to get
*
**
***
****
*****
******
*******
********
*********
**********
*********
********
*******
******
*****
****
***
**
*
0
I am getting
*
**********
*********
********
*******
******
*****
****
***
**
*
On repeat from 10 to 1 decreasing
0
What am I doing wrong? Your help is greatly appreciated. Thank you.