In [1]:
row = 10
for i in range(0, row):
for j in range(0, row):
print ('*', end = ' ')
print ('')
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
In [2]:
row = 10
for i in range(0, row):
for j in range(0, i + 1):
print ('*', end = ' ')
print ('')
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
In [3]:
row = 10
for i in range(0, row):
for j in range(0, row - i - 1):
print (' ', end = ' ')
for k in range(0, i + 1):
print('*', end = ' ')
print('')
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
In [4]:
row = 10
for i in range (0, row):
for j in range(0, row - i):
print ('*', end = ' ')
print ('')
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
In [5]:
row = 10
for i in range(0, row):
for j in range(0, i):
print (' ', end = ' ')
for k in range(0, row - i):
print ('*', end = ' ')
print ('')
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
No comments:
Post a Comment