## Solution for NPTEL Programming, Data Structures and Algorithms using Python, Week 2 Programming Assignment

Question :- A positive integer n is said to be perfect if the sum of the factors of n, other than n itself, add up to n. For instance 6 is perfect since the factors of 6 are {1,2,3,6} and 1+2+3=6. Likewise, 28 is perfect because the factors of 28 Read more…

## Solution for NPTEL, Introduction to Modern Application Development(IMAD) Week 3 MCQs

1) Which SQL statement is used to update a database table schema? a) UPDATE TABLE b) MODIFY TABLE c) ALTER TABLE d) CHANGE TABLE Answer(s) : c) ALTER TABLE 2) Database normalisation typically a) Reduces number of tables b) Reduces database size c) Reduces data constraints d) Reduces chances of Read more…

## Solution for NPTEL, AI: search methods for problem solving Week 2 MCQs

1) Which of the following algorithm(s) always terminate(s) on a finite search space?  a) DFS b) BFS c) DFID d) None of the above Answer(s) : a) DFS b) BFS c) DFID 2) Which of the following search algorithm(s) always find(s) a path to the goal (if there exists one) Read more…

## Solution for NPTEL, AI: search methods for problem solving Week 1 MCQs

1) A machine is … a) a device made of metal b) a device that converts electrical energy into kinetic energy c) a device that converts kinetic energy into electrical energy d) a device that is controlled by a set of rules or instructions Answer(s) : d) a device that Read more…

## Solution for NPTEL, Introduction to Algorithm and Analysis Week 2 MCQs

Algorhithm and Analysis assignment 2 1. If T(n)=9T(n/3)+n, then by master method T(n)= A. Θ(n). B. Θ(n2). C. Θ(n3). D. Θ(1).  B.Θ(n^2)   2. If T(n)=T(2n/3)+1, then by master method T(n)= A. Θ(logn). B. Θ(n2). C. Θ(n3). D. Θ(1).  A. Θ(nlogn)   3.If T(n)=2T(n/2)+ Θ(n), then by master method T(n)= Read more…

## Solution for NPTEL, Introduction to Modern Application Development(IMAD) Week 2 MCQs

1)Which of the below IPs is/are valid? a)23.54.23.21.32 b)123.132.212.32 c)234.11.265.34 d)3ffe:1900:4545:3:200:f8ff:fe21:67cf Answer : b)123.132.212.32 d)3ffe:1900:4545:3:200:f8ff:fe21:67cf 2)What protocol/protocols does the ‘ping’ command use? a)HTTP/HTTPS b)ICMP c)TCP d)IP Answer : b)ICMP 3)For a web page, HTML represents the: a)Structure of web page content b)Styling of web page content c)Animations of web page Read more…

## Solution for NPTEL Programming, Data Structures and Algorithms using Python Week 2 MCQs

Click here for Week 2 Programming assignment   1) One of the following 10 statements generates an error. Which one? (Your answer should be a number between 1 and 10.) x = [1,”abcd”,2,”efgh”,[3,4]] # Statement 1 y = x[0:50] # Statement 2 z = y # Statement 3 w Read more…

## Solution for NPTEL, Introduction to Algorithm and Analysis Week 1 MCQs

1. Algorithm A, B have running time 7n2+4n+5 and 3n2 respectively. Then in big theta approximation A. Both have same complexity B. A asymptotically beats B C. B asymptotically beats A D. None   A. Both have same complexity 2. Two main measure of efficiency of an algorithm A. processor Read more…

## Solution for NPTEL, Introduction to Modern Application Development(IMAD) Week 1 MCQs

1. What is a web-app?      a) It is a software which lets you access websites      b) It is a software you can use in a web browser      c) It is a software you can download from the web      d)It is Read more…

## Solution for NPTEL Programming, Data Structures and Algorithms using Python Week 1 MCQs

1)What would happen if we call gcd(m,n) with m positive and n negative in the following definition?

```def gcd(m,n):
if m < n:
(m,n) = (n,m)
if (m % n) == 0:
return(n)
else:
diff = m-n
return (gcd(max(n,diff),min(n,diff)))```