Skip to content
Progiez
Home
NPTEL
Cloud Computing Data Base Management System Blockchain and its Applications Ethical Hacking Introduction To Internet Of Things Introduction To Industry 4.0 And Industrial Internet Of Things Introduction To Machine Learning Developing Soft Skills and Personality Introduction To Programming In C Introduction to Operating Systems Probability And Statistics
Linkedin Learning
Academic Paper Writing and IPR Creativity and Critical Thinking Design Thinking and Creativity for Innovation Entrepreneurship Ethics and Gender Equality Learning and Problem Solving Skills Team Skills Time Management and ways of Thinking
Coursera CODECHEF
About Us
Contact us
Report an error
MORE
Privacy Policy Terms and Conditions Disclaimer
  • Home
  • NPTEL
  • Social Networks
  • Social Networks | Week 1

Related Progiez

NPTEL

  • Social Networks9
    • Social Networks | Week 1
    • Social Networks | Week 2
    • Social Networks | Week 3
    • Social Networks | Week 4
    • Social Networks | Week 5
    • Social Networks | Week 6
    • Social Networks | Week 7
    • Social Networks | Week 8
    • Social Networks | Week 9
  • An Introduction to Artificial Intelligence9
  • An Introduction to Programming Through C++6
  • Blockchain and its Applications9
  • Cloud Computing9
  • Computer Graphics6
  • Data Base Management System8
  • Data Science for Engineers8
  • Deep Learning9
  • Developing Soft Skills and Personality8
  • Discrete Mathematics13
  • Electric Vehicles4
  • Ethical Hacking9
  • Introduction To Industry 4.0 And Industrial Internet Of Things9
  • Introduction To Internet Of Things9
  • Introduction To Machine Learning17
  • Introduction to Operating Systems8
  • Introduction To Programming In C8
  • Principles of Managements9
  • Probability And Statistics9
  • Problem Solving Through Programming In C10
  • Programming Data Structure And Algorithms Using Python8
  • Programming In Java9
  • Programming in Modern C++9
  • Python for Data Science4
  • Soft Skills Development10
  • Software Testing9
  • The Joy of Computing Using Python10

Popular Progies

Latest Progies

Social Networks | Week 1

2 months ago
Progie
3 minutes

Course Name: Social Networks

Course Link: Click Here

These are Nptel Social Networks Week 1 Assignment 1 Answers


Q1) What would be the output for the following code?
scores=[78,77,45]
scores.append(90)
scores.append(98)
scores.reverse()
print(scores)
a. [98, 90, 78, 77, 45]
b. [78, 77, 45, 90, 98]
c. [98, 90, 45, 77, 78]
d. [78, 77, 45, 98, 90]

Answer: a. [98, 90, 78, 77, 45]


Q2) Given the following code, Which of the following is not a possible output?

import random

def calc():
    x=random.random()
    y=random.random()
    z=random.random()
    return( x+y+z )
print(calc())

a. 1.6115945523495627
b. 0.202709723169674
c. 2.3142203461882844
d. 3.9133426822720435

Answer: d. 3.9133426822720435


Q3) Which of the following statement creates the given dictionary, d:{1:1,2:4,3:9,4:16}
a. d={x:x∗∗2 for x in range(1,5)}
b. d={x:x∗∗2 for x in range(5)}
c. d={x:x∗∗2 for x in range(0,5)}
d. d={x:x∗∗2 for x in range(1,6)}

Answer: a. d={x:x∗∗2 for x in range(1,5)}


These are Nptel Social Networks Week 1 Assignment 1 Answers


Q4) Identify the graph output for the following segment:

import networkx as nx
import matplotlib.pyplot as plt
G=nx.Graph()
G.add_nodes_from([1,2,3,4,5])
G.add_edges_from([(1,2),(2,3),(2,5),(1,6),(3,4)])
nx.draw(G,with_labels=True)
plt.show()
image 16
a
image 17
b
image 18
c
image 19
d

Answer: a


These are Nptel Social Networks Week 1 Assignment 1 Answers


Q5) Given the following code, what is the number of edges in the graph created?
G=nx.Graph()
G.add_nodes_from([i for i in range(10)])

def create_graph(n):
    while(len(G.edges())< n):
        u=random.choice(list(G.nodes()))
        v=random.choice(list(G.nodes()))
        if u!=v and G.has_edge(u,v)==0:
        G.add_edge(u,v)

a. 9
b. 10
c. n
d. n−1

Answer: c. n


Q6) Which of the statements is True for the graph created from the statement: nx.gnp_random_graph(10,0.5)?
a. Graph has 10 nodes with half of the nodes connected
b. Graph has 10 nodes with each edge to be put with probability 0.5
c. Connected graph with 10 nodes
d. Graph has 5 nodes with half of the nodes connected

Answer: b. Graph has 10 nodes with each edge to be put with probability 0.5


These are Nptel Social Networks Week 1 Assignment 1 Answers


Q7) What is the maximum number of graphs that can be created from 10 nodes?
a. 2(10 2)
b. 2(2 10)
c. 210
d. 210 2

Answer: a. 2(10 2)


Q8) Given that we have n nodes in a network, what is the approximate number of steps to search a node?
a. nlogn
b. logn
c. nn
d. 2logn

Answer: b. logn


These are Nptel Social Networks Week 1 Assignment 1 Answers


Q9) Identify the layout for the graph given in the following figure.

image 20

a. spectral
b. spring
c. circular
d. random

Answer: d. random


Q10) Friend suggestion on Facebook is one of the applications of
a. Page ranking
b. Link prediction
c. Small work phenomenon
d. Cascading

Answer: b. Link prediction


* The material and content uploaded on this website are for general information and reference purposes only. Please do it by your own first. COPYING MATERIALS IS STRICTLY PROHIBITED.


These are Nptel Social Networks Week 1 Assignment 1 Answers

More Solutions of Social Networks: Click Here

More NPTEL Solutions: https://progiez.com/answers/nptel/


More from PROGIEZ

Social Networks | Week 9

Probability And Statistics | Week 9

The Joy of Computing using Python | Week 9

Software Testing | Week 9

Soft Skills Development | Week 9

Programming in Modern C++ | Week 9

Programming in Java | Week 9

These are Nptel Social Networks Week 1 Assignment 1 Answers
© 2023 PROGIEZ - Made By CUians
HOME About Us Privacy Policy Terms and Conditions Disclaimer Work with us Report an error