Programming Data Structures And Algorithms Using Python Assignment 3 Answers 2022

Programming Data Structures And Algorithms Using Python Assignment 3

Are you looking for the Answers to NPTEL Programming Data Structures And Algorithms Using Python Assignment 3? This article will help you with the answer to the National Programme on Technology Enhanced Learning (NPTEL) Course “ NPTEL Programming Data Structures And Algorithms Using Python Assignment 3

What is Programming Data Structures And Algorithms Using Python?

While hard skills teach us what to do, soft skills tell us how to apply our hard skills in a social environment. The focus of the course is to develop a wide variety of soft skills starting from communication, to working in different environments, developing emotional sensitivity, learning creative and critical decision making, developing awareness of how to work with and negotiate with people and to resolve stress and conflict in ourselves and others. 
The uniqueness of the course lies in how a wide range of relevant issues are raised, relevant skills discussed and tips for integration provided in order to make us effective in workplace and social environments.

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

Below you can find the answers for Programming Data Structures And Algorithms Using Python Assignment 3

Programming Data Structures And Algorithms Using Python Assignment 3 Answers:-

Q1.

Write three Python functions as specified below. Paste the text for all three functions together into the submission window. Your function will be called automatically with various inputs and should return values as specified. Do not write commands to read any input or print any output.

  • You may define additional auxiliary functions as needed.
  • In all cases you may assume that the value passed to the function is of the expected type, so your function does not have to check for malformed inputs.
  • For each function, there are normally some public test cases and some (hidden) private test cases.
  • “Compile and run” will evaluate your submission against the public test cases.
  • “Submit” will evaluate your submission against the hidden private test cases. There are 10 private test cases, with equal weightage. You will get feedback about which private test cases pass or fail, though you cannot see the actual test cases.
  • Ignore warnings about “Presentation errors”.
  1. Define a Python function remdup(l) that takes a nonempty list of integers l and removes all duplicates in l, keeping only the first occurrence of each number. For instance:
  2. Write a Python function sumsquare(l) that takes a nonempty list of integers and returns a list [odd,even], where odd is the sum of squares all the odd numbers in l and even is the sum of squares of all the even numbers in l.
  3. A two dimensional matrix can be represented in Python row-wise, as a list of lists: each inner list represents one row of the matrix. For instance, the matrix

???? Next Week Answers: Assignment 04 ????

quizxp telegram

Code:-

def remdup(l):
  L=[]
  for i in l:
    if i not in L:
      L.append(i)
  return(L)

def sumsquare(l):
  odd_sum=0
  even_sum=0
  for a in l:
    if a%2!=0:
      odd_sum+=a*a
    else:
      even_sum+=a*a
  return([odd_sum,even_sum])

def transpose(m):
  ans=list()
  for i in range(len(m[0])):
    a=[]
    for j in range(len(m)):
      a.append(m[j][i])
    ans.append(a)
  return(ans)

For other courses answers:- Visit

For Internship and job updates:- Visit

Disclaimer: We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own.

if you have any suggestions then comment below or contact us at [email protected]

If you found this article Interesting and helpful, don’t forget to share it with your friends to get this information.