+ 7
Python While Loop Exercise !
Creating this pattern with the Loops. * ** *** **** ***** ****** ******* ******** ********* ******** ******* ****** ***** **** *** ** *
5 ответов
+ 4
I prefer For Loops. Saves time and effort
count=0
for i in range(10):
count+=1
print("*"*count)
for i in range(10):
count-=1
print("*"*count)
0
This is using for loop:
p=0
for i in range(10):
p+=1
print("*"*p)
for i in range(10):
p-=1
print("*"*p)
0
You are the best Bhai!