NPTEL Social Networks Assignment 1 Answers 2024

NPTEL Social Networks Assignment 1 Answers 2024

Hello learners In this article we are going to discuss NPTEL Social Networks Assignment 1 Answers. All the Answers provided below to help the students as a reference, You must submit your assignment with your own knowledge and use this article as reference only.

About the course:-

The world has become highly interconnected and hence more complex than ever before. We are surrounded by a multitude of networks in our daily life, for example, friendship networks, online social networks, world wide web, road networks etc. All these networks are today available online in the form of graphs which hold a whole lot of hidden information. They encompass surprising secrets which have been time and again revealed with the help of tools like graph theory, sociology, game theory etc.

NPTEL Social Networks Assignment 1 Answers 2024:

1. Which of the following is the output of the given code segment?

l=[]

l.append (5)

l.append (”AAA”)

l.append ([2,3])

print(l)

Answer :- Will update answers soon and update on our telegram channel so Join Click Here

2. Assume you have to roll a dice with six faces. Choose the statement to simulate the same.

Answer :-

3. Select the code to create the given dictionary:
{1 : 2, 2 : 4, 3 : 6, 4 : 8, 5 : 10, 6 : 12, 7 : 14, 8 : 16, 9 : 18}

Answer :- 

4. What does the G(n,p) random graph model in Networkx library represent?

Answer :- 

5. What is the output of the following code snippet?

import networkx

G = networkx.Graph( )

G.add_edges_from ([(2,1), (2,3), (4,2), (2,5)])

G.remove node ( 2 )

print(len(G.edges( )))

Answer :- 

6. Which of the following functions is used to find the shortest path length?

Answer :- 

7. What does the Page Rank algorithm measure?

Answer :- 

8. The code inside the ‘try’ block is monitored for any exceptions. The ‘except’ block contains the code to handle the exception, providing an alternative path for the program to continue execution. Find the output for the given code snippet:

x=[5,2,7,3,8]

try :

a=x[3]

if(a%2==0):

print(”It is an even number”)

else:

print(”It is an odd number”)

except:

print(”Element does not exist”)

Answer :- 

9. What is the maximum number of graphs possible from 70 nodes?

Answer :- 

10. Which algorithm or concept should be used to suggest connections on LinkedIn?

Answer:-