last lab
This commit is contained in:
13
labPython/lab6/Matr7.py
Executable file
13
labPython/lab6/Matr7.py
Executable file
@@ -0,0 +1,13 @@
|
||||
from numpy import array, full, fill_diagonal, fliplr
|
||||
|
||||
count = int(input("введите число строк в матрице (nxn): "))
|
||||
|
||||
if count%2!=1:
|
||||
count+=1
|
||||
Array = full((count, count), ".")
|
||||
new_diag = ["*" for _ in range(count)]
|
||||
fill_diagonal(Array, new_diag)
|
||||
Array = fliplr(Array)
|
||||
fill_diagonal(Array, new_diag)
|
||||
Array = fliplr(Array)
|
||||
print (Array)
|
||||
Reference in New Issue
Block a user