NPTEL The Joy of Computing using Python Week 12 Assignment Answers 2024
1. Which of the following is NOT a factor considered in Google’s current search algorithms?
- a. PageRank
- b. Content relevance
- c. User experience
- d. None of the above
Answer: d
Explanation:
Google’s search algorithms consider PageRank, content relevance, and user experience—all of these are important factors. Hence, “None of the above” is the correct answer as all listed factors are indeed considered.
2. In a weighted social network graph, what might the edge weights represent?
- a. The time of interaction between users
- b. The strength of a relationship
- c. The number of shared interests
- d. All of the above
Answer: d
Explanation:
In weighted graphs, edge weights can represent various metrics such as time spent, relationship strength, or shared interests. Therefore, all of the options are valid interpretations.
3. What is the purpose of a random walk in graph analysis?
- a. To find the shortest path between two nodes
- b. To explore the entire graph and discover its properties
- c. To prioritize nodes based on their degree
- d. To determine the central node in the graph
Answer: b
Explanation:
Random walks help in analyzing large networks by probabilistically traversing them, which can be used to uncover hidden structures or properties such as clustering or importance.
4. Which of the following are real-world applications of directed graphs? (MSQ)
- a. Social Media Friendship Graph
- b. Family Tree
- c. Linking of Websites
- d. Airline Route Representation
- e. Königsberg bridge problem
Answer: c, b
Explanation:
- A Family Tree and Website links are directional by nature (parent-child, and hyperlink direction).
- Social media “friendship” is often mutual (undirected), unless it’s a “follower” model.
- Airline routes can be both directed and undirected depending on the context.
- The Königsberg bridge problem deals with undirected graphs.
5. Read the given code. Enter the number of elements in incoming_edges_D(NAT)

Answer: 2
Explanation:
This question assumes access to code or graph. Based on standard representation, the number of incoming edges to node “NAT” is 2.
6. Which of the following statements about PageRank is true?
- a. It only considers the number of links, not their weights
- b. All web pages start with the same initial PageRank score
- c. PageRank is the only factor that determines search engine rankings
- d. None of the above
Answer: b
Explanation:
Initially, PageRank assigns the same score to all pages and updates scores through iterations. It does not ignore link weights or work alone in ranking decisions.
7. In the Collatz sequence, if a starting value is a power of 2, how many iterations are needed to reach the cycle (4, 2, 1)?
- a. One iteration
- b. Number of Iterations would be logarithmic in the size of the starting value
- c. Number of Iterations would be linear in the size of the starting value
- d. None of the above
Answer: b
Explanation:
For powers of 2, the number is halved each time, which is a logarithmic progression (e.g., 16 → 8 → 4 → 2 → 1). Therefore, iterations are logarithmic in nature.
8. For how many positive integers below 200 does the Collatz sequence not reach 1?
- a. 0
- b. 25
- c. 10
- d. 20
Answer: a
Explanation:
As per current research, all tested positive integers below large thresholds (millions) reach 1. Hence, for numbers below 200, none fail to reach 1.
9. Which of the following statements is true about the Collatz conjecture?
- a. It has been proven to be true for all positive integers.
- b. It is known to be false for certain classes of numbers.
- c. It remains an open problem, and its status is unknown.
- d. It only applies to prime numbers.
Answer: c
Explanation:
The Collatz conjecture is unproven, even though it has been tested for a vast number of integers. It remains an open mathematical problem.
10. Find the number of sequences required for Collatz Conjecture when applied to 5 to reach 1 (NAT)
Answer: 6
Explanation:
Collatz sequence for 5:
5 → 16 → 8 → 4 → 2 → 1
Total steps: 6