Can you please help me with this task in sage? [closed]

asked 2019-01-27 17:39:54 +0200

1) Enter the program function sum_quadrate() with matrix A.The function returns the sum of those matrix elements that are complete squares. The x is complete square if the command is_square (x) returns the True value.

          [4 1 6 ]

matrix A=[1 3 9 ] [2 7 25] ...

def sum_quadrate (A): m=A.nrows() n=A.ncols() True=0 for i in range (m): for j in range(n): if....??? I wrote this but from last row i dont know what goes next

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by tmonteil
close date 2019-01-27 17:47:05.163087

Comments

slelievre gravatar imageslelievre ( 2019-01-27 19:11:51 +0200 )edit