We Discuss About That NPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answer
NPTEL Programming Data Structures And Algorithms Using Python Assignment Answer â Here All The Questions and Answers Provided to Help All The Students and NPTEL Candidate as a Reference Purpose, It is Mandetory to Submit Your Weekly Assignment By Your Own Understand Level.
Are you looking for the Assignment Answers to NPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answer? If Yes You are in Our Great Place to Getting Your Solution, This Post Should be help you with the Assignment answer to the National Programme on Technology Enhanced Learning (NPTEL) Course âNPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answerâ
NPTEL Programming Data Structures And Algorithms Using Python Assignment
INTENDED AUDIENCE:Â Students in any branch of mathematics/science/engineering, 1st year
PREREQUISITES:Â Â Â Â Â School level mathematics.
This course can have Associate in Nursing unproctored programming communication conjointly excluding the Proctored communication, please check announcement section for date and time. The programming communication can have a weightage of twenty fifth towards the ultimate score.
- Assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course.
- ( All assignments in a particular week will be counted towards final scoring â quizzes and programming assignments).Â
- Unproctored programming exam score = 25% of the average scores obtained as part of Unproctored programming exam â out of 100
- Proctored Exam score =50% of the proctored certification exam score out of 100
UNPROCTORED PROGRAMMING EXAM SCORE >=10/25 AND PROCTORED EXAM SCORE >= 20/50.Â
CHECK HERE OTHERS NPTEL ASSIGNMENTS ANSWERSÂ
BELOW YOU CAN GET YOUR NPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answer 2022? :
1. One of the following 10 statements generates an error. Which one? (Your answer should be a number between 1 and 10.)
x = [[3,5],"mimsy",2,"borogove",1] # Statement 1
y = x[0:50] # Statement 2
z = y # Statement 3
w = x # Statement 4
x[1] = x[1][:5] + 'ery' # Statement 5
y[1] = 4 # Statement 6
w[1][:3] = 'fea' # Statement 7
z[4] = 42 # Statement 8
x[0][0] = 5555 # Statement 9
a = (x[3][1] == 1) # Statement 10
Answer:- 7
2. Consider the following lines of Python code.
Which of the following holds at the end of this code?
a. a[0] == 47, b[3] == 73, c[3] == 73, d[1] == 47
b. a[0] == 65, b[3] == 105, c[3] == 73, d[1] == 95
c. a[0] == 65, b[3] == 73, c[3] == 73, d[1] == 95
d. a[0] == 95, b[3] == 73, c[3] == 73, d[1] == 95
b = [43,99,65,105,4]
a = b[2:]
d = b[1:]
c = b
d[1] = 95
b[2] = 47
c[3] = 73
Answer:- c
3. What is the value of endmsg after executing the following lines?
startmsg = "anaconda"
endmsg = ""
for i in range(1,1+len(startmsg)):
endmsg = endmsg + startmsg[-i]
Answer:- âanacondaâ
4. What is the value of mylist after the following lines are executed?
def mystery(l):
l = l[2:]
return(l)
mylist = [7,11,13,17,19,21]
mystery(mylist)
Answer:- [7, 11, 13, 17, 19, 21]
Programming Data Structures And Algorithms Using Python Assignment 2 Coding Solutions July 2022
Q1. Write a function intreverse(n) that takes as input a positive integer n and returns the integer obtained by reversing the digits in n.
Write a function matched(s) that takes as input a string s and checks if the brackets â(â and â)â in s are matched: that is, every â(â has a matching â)â after it and every â)â has a matching â(â before it. Your function should ignore all other symbols that appear in s. Your function should return True if s has matched brackets and False if it does not.
Write a function sumprimes(l) that takes as input a list of integers l and retuns the sum of all the prime numbers in l.
Code:-
def intreverse(n):
ans = 0
while n > 0:
(d,n) = (n%10,n//10)
ans = 10*ans + d
return(ans)
def matched(s):
nested = 0
for i in range(0,len(s)):
if s[i] == "(":
nested = nested+1
elif s[i] == ")":
nested = nested-1
if nested < 0:
return(False)
return(nested == 0)
def factors(n):
factorlist = []
for i in range(1,n+1):
if n%i == 0:
factorlist = factorlist + [i]
return(factorlist)
def isprime(n):
return(factors(n) == [1,n])
def sumprimes(l):
sum = 0
for i in range(0,len(l)):
if isprime(l[i]):
sum = sum+l[i]
return(sum)
Yhaa You have done it but next? if YOU Want to your Others NPTEL Programming Data Structures And Algorithms Using Python Assignment 2 Answer Then Follow US HERE and Join Telegram.