I want to generate a n*n matrix from user inputing the value of n and elements of the matrix.
Following is the code:
n=int(input("Enter the matrix size"))
import numpy as np
#initialise nxn matrix with zeroes
mat=np.zeros((n,n))
#input each row at a time,with each element separated by a space
for i in range(n):
for j in range(n):
mat[i][j]=input()
print(mat)
but I am getting output like this
[[1. 2.]
[3. 4.]]
with a . (point) after the numbers which I don't want. Is there any way to get this with using loops and array only not NumPy?