# The Joy of Computing using Python | NPTEL 2023 | Week 9 Solutions This set of MCQ(multiple choice questions) focuses on the The Joy of Computing using Python Week 9 Solutions.

The course carries programming to your work area with stories, similarities and distinguished models. Going reflections to experiences and designing to engineering, the course concentrates fundamentally to rouse the student’s psyche to automatically think intelligently and show up at an answer. As a feature of the course, you will figure out how to practice and culture the craft of programming with Python as a language.

### Course layout

NOTE: You can check your answer immediately by clicking show answer button. The Joy of Computing using Python Week 9 Solutions” contains 10 questions.

Now, start attempting the quiz.

### The Joy of Computing using Python Week 9 Solutions

Q1. How can we identify which book is written by which author?

a) By matching handwriting.
b) By analyzing word length with previous books.
c) By analyzing the number of pages in a book.
d) By analyzing the book’s preface.

Answer: b) By analyzing word length with previous books.

The Joy of Computing using Python week 9 Solutions

Q2. How can a list L be transformed into a tuple?

a) tuple(L)
b) tup(L)
c) L(tuple)
d) L(tup)

Q3. Will the following piece of code always return True?

``````G = nx.gnp_random_graph(10, 0.5)
print(nx.is_connected(G))``````

a) True
b) False

Q4. What is the output of the following code?

Q5. How many edges are there in the following graph?

a) 4
b) 5
c) 3
d) 2

The Joy of Computing using Python week 9 Solutions

Q6. How many neighbors does node 3 have?

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

Q7. In which of the following ways can we create a string in python?

a) By using single quotes.
b) By using double-quotes.
c) By using triple-quotes.
d) All of the above.

Answer: d) All of the above.

The Joy of Computing using Python week 9 Solutions

Q8. Which of the following is not true about Stylometry Analysis?

a) It is quantitative study of literature style
b) It is based on the observation that the authors tend to write in relatively consistent and recognisable ways
c) any two people may have same vocabulary
d) It is a tool to study variety of questions involving style of writing

Answer: c) any two people may have same vocabulary

The Joy of Computing using Python week 9 Solutions

Q9. A complete graph will have __ degree of separation

a) 1
b) 2
c) 3
d) Depends on the number of nodes.

Q10. Networkx in pythons is used for

a) Making networks
b) Analyzing networks
c) Visualizing networks
d) All of the above

Answer: d) All of the above

The Joy of Computing using Python week 9 Solutions

### The Joy of Computing using Python Week 9 Solutions

Q1. Which of the following ways can help to identify the author of a book?

a) Books coverage
b) The uniqueness of writing.
c) Average word length.
d) Publisher name.

The Joy of Computing using Python week 9 Solutions

Q2. Networkx in pythons is used for

a) Making networks
b) Analyzing networks
c) Visualizing networks
d) Breaking networks

Q3. What is the output of the following program?
s = ‘joc python’
print(list(s))

a) [‘joc, ‘python’]
b) [‘j’, ‘o’, ‘c’, ‘p’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]
c) [‘j’, ‘o’, ‘c’, ‘ ‘, ‘p’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]
d) [‘ ‘, ‘c’, ‘h’, ‘j’, ‘n’, ‘o’, ‘o’, ‘p’, ‘t’, ‘y’]

Answer: c) [‘j’, ‘o’, ‘c’, ‘ ‘, ‘p’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]

Q4. In the world, on average, how many hops it will take to connect two people?

a) 6
b) 7
c) 8
d) 9
e) 10

Q5. In the following code, nx.is_connected(G) will return?
import networkx as nx
G = nx.gnp_random_graph(5,1)

a) True
b) False
c) Sometimes True, sometimes false

The Joy of Computing using Python week 9 Solutions

Q6. How many neighbors does node 4 have?

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

Q7. While calculating the area of a state, how can we increase the accuracy of the calculated area?

a) By increasing the size of the image.
b) By increasing the number of points.
c) By decreasing the size of the image.
d) By decreasing the number of points.

Answer: b) By increasing the number of points.

The Joy of Computing using Python week 9 Solutions

Q8. How many nodes and edges does the following graph have?

a) 5,5
b) 2, 5
c) 5, 2
d) 2, 2

The Joy of Computing using Python week 9 Solutions

Q9. Which function of NLTK is used to make a frequency distribution of words?

a) freqdist()
b) FreqDist()
c) frequency_distribution
d) freq_dist()

Q10. Degree of separation for the following graph is

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

`DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.`