Header Ads Widget

Social Networks Week 1 Nptel Assignment Answer

Social Networks Week 1 Nptel Assignment Answer



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

   - Correct Option: [5, 'AAA', [2, 3]]


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

   - Correct Option: `random.randint(1, 6)`


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}

   - Correct Option: `d={x:x*2 for x in range(1,10)} print(d)`


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

   - Correct Option: A graph with n nodes and p is the probability of an edge between any two nodes


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

   - Correct Option: 3


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

   - Correct Option: `networkx.dijkstra_path_length(G, 'node a', 'node b')`


7. What does the Page Rank algorithm measure?

   - Correct Option: The person who is more important in the network


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:

   - Correct Option: It is an odd number


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

   - Correct Option: \(2^{702}\)


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

    - Correct Option: Link Prediction

Post a Comment

0 Comments