Four sides of square: Difference between revisions

Content added Content deleted
(added AWK)
No edit summary
Line 440: Line 440:
=={{header|Phix}}==
=={{header|Phix}}==
See [[Matrix_with_two_diagonals#GUI.2Fonline|Matrix_with_two_diagonals#Phix]] and press 'O'.
See [[Matrix_with_two_diagonals#GUI.2Fonline|Matrix_with_two_diagonals#Phix]] and press 'O'.

=={{header|Python}}==
<lang python>
size = 9
for Row in range(size):
for Col in range(size):
if (Row == 0 or Row == size-1 or Col == 0 or Col == size-1):
print("1",end=" ")
else:
print("0",end=" ")
print()
</lang>
{{out}}
1 1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1


=={{header|Raku}}==
=={{header|Raku}}==