Jump to content

Four sides of square: Difference between revisions

no edit summary
(added AWK)
No edit summary
Line 440:
=={{header|Phix}}==
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}}==
2,468

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.