Social Networks | NPTEL 2022 | Week 1 Assignment Solutions

This set of MCQ(multiple choice questions) focuses on the Social Networks NPTEL Week 1 Assignment Solutions.

Course layout

Answers COMING SOON! Kindly Wait!

Week 0: Assignment answers
Week 1: Introduction
Week 2: Handling Real-world Network Datasets
Week 3: Strength of Weak Ties
Week 4: Strong and Weak Relationships (Continued) & Homophily 
Week 5: Homophily Continued and +Ve / -Ve Relationships
Week 6: Link Analysis 
Week 7: Cascading Behaviour in Networks
Week 8: Link Analysis (Continued)
Week 9: Power Laws and Rich-Get-Richer Phenomena
Week 10: Power law (contd..) and Epidemics
Week 11: Small World Phenomenon
Week 12: Pseudocore (How to go viral on web)

NOTE: You can check your answer immediately by clicking show answer button. Social Networks NPTEL 2022 Week 1 Assignment Solution” contains 10 questions.

Now, start attempting the quiz.

Social Networks NPTEL 2022 Week 1 Assignment Solutions

Q1. Let L = [“one”, “two”, [“three”, “four”, “five”, “six”], “seven”, [“eight”], []] be the list. What will be the output of len(L) (written in Python3)?

a) 5
b) 6
c) 8
d) 9

Answer: b) 6

Q2. Which of the following functions is used to create a directed graphs with self loops and parallel edges in NetworkX?

a) networkx.MultiDirectedGraph()
b) networkx.Multi_Di_Graph()
c) networkx.MultiDiGraph()
d) networkx.Graph(create_using = ‘Multi Directed’)

Answer: c) networkx.MultiDiGraph()

Q3. If string = ‘Mississippi’, what will be the output of string[0:6] (written in Python3)?

a) ‘Missis’
b) ‘Mississ’
c) ‘Mississi’
d) TypeError

Answer: a) ‘Missis’

Q4. Total number of possible edges on a graph (undirected and without loops) on n vertices is not:

a) n(n−1)/2
b) n/2
c) 1+2+3+⋅⋅⋅+(n−1)+n
d) 1+2+3+⋅⋅⋅+(n−1)

Answer: c) 1+2+3+⋅⋅⋅+(n−1)+n

Q5. If d = {0:’a’, 1:’b’, 2:’c’, 3:’d’} is the dictionary then which among the following codes (written in Python3) would reverse keys and values of d?

a) {v:k for k,v in d.items()}
b) {d[i]:i for i in range(4)}
c) {d[i]:i for i in d}
d) All of the above

Answer: d) All of the above

Social Networks NPTEL Week 1 Assignment Solutions

Q6. Let the number of atoms in the explored universe be 10801080. Pick the smallest number of nodes from the below given options such that the number of possible graphs on that many nodes is greater or equal to the number of atoms in the explored universe. (Assume log2log210 = 3.3)

a) 23
b) 24
c) 25
d) 26

Answer: b) 24

Q7. What is the output of the following code snippet (written in Python3):

import networkx
G = networkx.Graph()
G.add_edges_from([(1, 2), (1, 3), (4, 1), (1, 5)])
G.remove_node(1)
print(len(G.edges()))

a) 0
b) 1
c) 2
d) 3

Answer: a) 0

Social Networks NPTEL Week 1 Assignment Solutions

Q8. Let t be a tuple (“social”, “networks”, “IIT”). What will be the output of t.append((“Ropar”)), written in Python3?

a) (“social”, “networks”, “IIT”, “Ropar”)
b) (“social”, “networks”, “IIT”, (“Ropar”))
c) (“social”, “networks”, (“IIT”, “Ropar”))
d) Attribute Error

Answer: d) Attribute Error

Social Networks NPTEL week 1 Assignment Solutions

Q9. Which of the following is correct?

(A) A variable name must start with a letter or the underscore character
(B) A variable name can start with a number
(C) A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _)
(D) Variable names are case-sensitive (ropar, Ropar and ROPAR are three different variables)

a) Only A and B
b) Only A, B and C
c) Only B and D
d) Only A, C and D

Answer: d) Only A, C and D

Q10. For integers n>1, let Gn be a complete graph on n vertices such that each vertex is labeled by a distinct number 1,2,3,â‹…â‹…â‹…,n, and each edge is labeled by the sum of its endpoint labels. The sum of all the edge labels is:

a) n(n−1)2/2
b) n(n−1)(n+1)/2
c) n(n−1)(n+1)
d) n(n+1)/2

Answer: b) n(n−1)(n+1)/2

Social Networks NPTEL week 1 Assignment Solutions

<< Prev- Social Networks Week 0 Assignment Solutions

>> Next- Social Networks Week 2 Assignment Solutions


NPTEL answers: Problem solving through programming in C

Programming in Java NPTEL week 1 quiz answers

NPTEL – Python for Data Science assignment solutions

Nptel – Deep Learning assignment solutions

The above question set contains all the correct answers. But in any case, you find any typographical, grammatical or any other error in our site then kindly inform us. Don’t forget to provide the appropriate URL along with error description. So that we can easily correct it.

Thanks in advance.

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.

Leave a Comment

Your email address will not be published. Required fields are marked *