NPTEL The Joy of Computing using Python Week 12 Assignment Answers 2025
1. Which of the following graphs is generated by the given Python code using the networkx module?
Answer :- For Answers Click Here
2. In networkX, which function is used to return the degree of a specific node?
- G.degree(node)
- G.get_degree(node)
- G.node_degree(node)
- G.find_degree(node)
Answer :-
3. Observe the following graph generated using the networkx module. How many edges does this graph contain?
- 6
- 7
- 8
- 9
Answer :-
4. What does nx.cycle graph(4) generate?
- A directed cycle of 4 nodes
- A cycle graph with 4 nodes connected in a closed loop
- A ladder graph with 4 rounds in the ladder
- A complete graph with 4 nodes
Answer :-
5. Observe the following graph generated using the networkx module. What type of graph is this?
- Ladder Graph
- Barbell Graph
- Wheel Graph
- Star Graph
Answer :- For Answers Click Here
6. What will be the output of the following code?
- (4, 4)
- (4, 8)
- (4, 2)
- (8, 4)
Answer :-
7. What is the output of this code?
- 7
- 16
- 5
- 10
Answer :-
8. What will be the first 10 numbers generated starting from n = 7?
- [7, 36, 18, 9, 46, 23, 116, 58, 29, 146]
- [7, 36, 18, 9, 28, 14, 7, 36, 18, 9]
- [7, 20, 10, 5, 26, 13, 66, 33, 166, 83]
- [7, 31, 15, 7, 36, 18, 9, 46, 23, 116]
Answer :-
9. Which technique is used in the PageRank algorithm to determine the rank of a web page?
- Depth-First Search
- Hyperlink Analysis
- Random Walk Simulation
- Data Scraping
Answer :-
10. In the PageRank algorithm, what happens when a page receives multiple inbound links from highly ranked pages?
- ts rank decreases due to increased server load
- Its rank improves
- Its rank remains the same
- It is considered less relevant
Answer :- For Answers Click Here