Programming, Data Structures And Algorithms Using Python
--------------------------------------------
Week 3 Programming Assignment
--------------------------------------------
Due on 2022-02-17, 23:59 IST
def remdup(l):
p=[]
for x in l:
if(x not in p):
p=p+[x]
return(p)
def sumsquare(l):
list=[0,0]
for i in range(len(l)):
if l[i]%2==0:
list[1]+=l[i]**2
else:
list[0]+=l[i]**2
return (list)
def transpose(m):
list=[]
c=len(m[0])
r=len(m)
for i in range(0,c):
li=[]
for j in range(0,r):
li=li+[m[j][i]]
list=list+[li]
return(list)
~~~THERE IS SOME INVISIBLE CODE HERE~~~
----------------------------------------------------------
No comments:
Post a Comment
Keep your comments reader friendly. Be civil and respectful. No self-promotion or spam. Stick to the topic. Questions welcome.