Square:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 7 or col == 7:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * * *
* *
* *
* *
* *
* *
* * * * * * *
Letter A:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or col == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
* *
* *
* * * * * * *
* *
* *
Letter B:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or row == 7 or col == 7 :
if (row == 1 and (col == 7)) or (row == 7 and (col == 7)) or (row == 4 and col == 7):
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * *
* *
* *
* * * * * *
* *
* *
* * * * * *
Letter C:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
*
*
*
*
*
* * * * *
Letter D:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 7 or col == 7 :
if not (row==col) :
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * *
* *
* *
* *
* *
* *
* * * * * *
Letter E:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or row == 7 :
if (row == 1 and (col == 7)) or (row == 7 and (col == 7)) or col == 7:
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * *
*
*
* * * * * *
*
*
* * * * * *
Letter F:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 :
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * * *
*
*
* * * * * * *
*
*
*
Letter G:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or col == 7 or row == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7) or (row == 2 or row == 3) and col == 7) or (row == 4 and col == 2) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
*
*
* * * * * *
* *
* *
* * * * *
Letter H:
for row in range(1,8):
for col in range (1,8):
if col == 1 or row == 4 or col == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* *
* *
* * * * * * *
* *
* *
Letter I:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 4 or row == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
*
*
*
*
*
* * * * *
Letter J:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 4 or row == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7)) or (row == 7 and (col == 4 or col==5 or col == 6)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
*
*
*
*
*
* *
Letter L:
for row in range(1,8):
for col in range (1,8):
if row == 7 or col == 1 :
if (row == 1 and ( col == 7)) or (row == 7 and ( col == 7)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
*
*
*
*
*
*
* * * * * *
Letter M:
for row in range(1,8):
for col in range(1,8):
if col == 1 or col == 7 or row == col or row+col==8:
if (row == 5 and (col == 3 or col == 5)) or (row == 6 and (col == 2 or col == 6)):
print(" ", end=' ')
else:
print('*',end=' ')
else:
print(" ", end=' ')
print()
Output:
* *
* * * *
* * * *
* * *
* *
* *
* *
Letter N:
for row in range(1,8):
for col in range(1,8):
if col == 1 or col == 7 or row == col or row+col==8:
if (row == 5 and (col == 3 )) or (row == 6 and (col == 2 )) or (row == 3 and col == 5) or (row == 2 and col == 6):
print(" ", end=' ')
else:
print('*',end=' ')
else:
print(" ", end=' ')
print()
Output:
* *
* * *
* * *
* * *
* * *
* * *
* *
Letter O:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 7 or col == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7)):
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
* *
* *
* *
* *
* *
* * * * *
Letter P:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or col == 7 :
if (row == 1 and ( col == 7)) or ((row == 4 or row == 7) and (col == 7)) or ((row == 5 or row == 6) and col == 7) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * *
* *
* *
* * * * * *
*
*
*
Letter R:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or col == 7 or row == col or row+col==8 :
if (row == 1 and ( col == 7)) or ((row == 4 ) and (col == 7)) or ((row == 5 or row == 6) and col == 7) or (row == 5 and (col == 3 )) or (row == 6 and (col == 2 )) or (row == 3 and col == 5) or (row == 2 and col == 6) or (row == 2 and col == 2) or ( row == 3 and col == 3):
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * *
* *
* *
* * * * * *
* *
* *
* *
Letter S:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or col == 7 or row == 7 :
if (row == 1 and (col == 1 or col == 7)) or ((row == 7 or row == 4) and (col == 1 or col == 7)) or ((row == 2 or row == 3) and col == 7) or ((row == 5 or row == 6 ) and col == 1) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
*
*
* * * * *
*
*
* * * * *
Letter T:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 4 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
*
*
*
*
*
*
Letter U:
for row in range(1,8):
for col in range (1,8):
if col == 1 or col == 7 or row == 7 :
if (row == 7 and (col == 1 or col == 7)) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* *
* *
* *
* *
* *
* *
* * * * *
Letter V:
for row in range(1,8):
for col in range(1,8):
if row == col or row+col==8:
if (row == 5 and (col == 3 or col == 5)) or (row == 6 and (col == 2 or col == 6) or row == 7 ):
print(" ", end=' ')
else:
print('*',end=' ')
else:
print(" ", end=' ')
print()
Output:
* *
* *
* *
*
Letter X:
for row in range(1,8):
for col in range(1,8):
if row == col or row+col==8:
print("*", end=' ')
else:
print(" ", end=' ')
print()
Output:
* *
* *
* *
*
* *
* *
* *
Letter Y:
for row in range(1,8):
for col in range(1,8):
if col == 4 or row == col or row+col==8:
if (row == 5 and (col == 3 or col == 5)) or (row == 6 and (col == 2 or col == 6) or row == 7 or (row == 1 and col == 4) or (row == 2 and col == 4) or (row == 3 and col ==4)):
print(" ", end=' ')
else:
print('*',end=' ')
else:
print(" ", end=' ')
print()
Output:
* *
* *
* *
*
*
*
Letter Z:
for row in range(1,8):
for col in range(1,8):
if row == 1 or row == 7 or row+col==8:
print('*',end=' ')
else:
print(" ", end=' ')
print()
Output:
* * * * * * *
*
*
*
*
*
* * * * * * *
** Number 3:**
for row in range(1,8):
for col in range (1,8):
if row == 1 or row == 4 or row == 7 or col == 7 :
if (row == 1 and (col == 7)) or (row == 7 and (col == 7)):
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * *
*
*
* * * * * * *
*
*
* * * * * *
Number 6:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or col == 7 or row == 7 :
if (row == 1 and (col == 1 or col == 7)) or (row == 7 and (col == 1 or col == 7) or (row == 2 or row == 3) and col == 7) :
print(' ',end = ' ')
else:
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * *
*
*
* * * * * * *
* *
* *
* * * * *
Number 8:
for row in range(1,8):
for col in range (1,8):
if row == 1 or col == 1 or row == 4 or row == 7 or col == 7 :
print('*',end=' ')
else:
print(' ',end=' ')
print()
Output:
* * * * * * *
* *
* *
* * * * * * *
* *
* *
* * * * * * *
Top comments (0)