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 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)))