The joy of computing using Python Week - 9

Quiz Week 9 : Assignment 9

1. ‘nltk.download()‘ function downloads necessary packages for the Natural Language Toolkit (NLTK) library?

  • True
  • False

2. Which of the following best defines a complete graph?

  • A graph where every pair of distinct vertices is connected by a unique edge
  • A graph with no edges
  • A graph with a single vertex
  • A graph with at least one loop

3. How many edges are there in a complete graph with 4 nodes?

  • 6
  • 8
  • 12
  • 16

4. Which Python library is most commonly used for working with graphs related to networks?

  • Random
  • Pandas
  • NumPy
  • NetworkX

5. Gephi is:

  • A Python library for linear algebra
  • A software for visualizing and analyzing large networks
  • A tool for data cleaning and preprocessing
  • A Python library for building statistical models

6. How many attributes typically define a color in digital representations?

  • 1
  • 2
  • 3 
  • 9

7. What is the degree of a node in a graph?

  • The number of edges connected to the node
  • The shortest path between two nodes
  • The number of nodes in the graph
  • The distance from the node to the center of the graph

8. What is the primary goal of stylometry?

  • To analyze the style and structure of literary works for authorship attribution
  • To create stylized graphics for digital art
  • To study phonology of languages
  • To enhance the readability of texts by adjusting font styles

9. Given the following Python code, what is printed in the end?

x = ["apple", "banana", "cherry", "date"]
k = 0
for item in x:
 k += len(item)

print(k)

  • 4
  • 21
  • 24
  • 26

10. How can you estimate the area of a sub-region within a larger region by randomly throwing points in the larger region?

  • By counting the total number of points and calculating the sum of their distances from the center
  • By calculating the proportion of points that land in the sub-region compared to the total number of points in the larger region
  • By calculating the distance between each point and the boundary of the region
  • By averaging the coordinates of all the points that land in the larger region

Discussion makes the solution more accurate ( social computing ) discuss the solution in comments. Do share this with your friends !! Comment the queries, I will reach out to you.
Week 9 programming assignment solution coming soon

Comments

Popular posts from this blog

The Joy of Computing using python -Week 1