NPTEL | Joy of computing using Python | WEEK 7 | Programming Assignment 1:Upper Triangular Matrix



NPTEL | Joy of computing using Python | WEEK 7 | Programming Assignment 1:Upper Triangular Matrix
_____________________________________ _________
week 7 Programming assignment
symmetric matrix(Q 2):
binary matrix(Q.3):

Week 7 question 1 :

Week 7 question 2:

Week 7 question 3:

Week 7 quiz:

, , , , , , , , , ,

8 thoughts on “NPTEL | Joy of computing using Python | WEEK 7 | Programming Assignment 1:Upper Triangular Matrix

  1. n=input()

    n=int(n)

    a=[]

    for i in range(n):

    l=[]

    for j in range(n):

    l.append(0)

    a.append(l)

    for i in range(n):

    o=[int(g) for g in input().split(" ")]

    for j in range(n):

    a[i][j]=o[j]

    for i in range(n):

    for j in range(n):

    if i>j:

    a[i][j]=0

    for i in range(n):

    if(i!=0):

    print( )

    for j in range(n):

    if(j==(n-1)):

    print(a[i][j],end='')

    else:

    print(a[i][j],end=' ')

Leave a Reply

Your email address will not be published. Required fields are marked *