NPTEL The Joy of Computing using Python Week 9 Assignment Answers 2025
1. How can we identify which book is written by which author?
- By matching handwriting.
- By analyzing word length with previous books.
- By analyzing the number of pages in a book.
- By analyzing the book’s preface.
Answer :- For Answers Click Here
2. What is the key difference between lists and tuples in Python, and when would you choose one over the other?
- Lists are immutable and can be used when elements need to be modified, while tuples are mutable and best for storing fixed data.
- Lists are mutable and can be used for dynamic data manipulation, while tuples are immutable and used to store fixed collections of items.
- Both lists and tuples are mutable and can be used interchangeably for any purpose.
- Tuples are used only for string data, while lists can store any data type.
Answer :-
3. Will the following piece of code always return True?

- True
- False
Answer :-
4. What is the output of the following code?





Answer :-
5. What is the total degree of the given graph?

- 10
- 8
- 6
- 4
Answer :- For Answers Click Here
6. Which of the following is always true for a connected undirected graph with at least one edge?
- Every node has an even degree
- The sum of all node degrees is even
- The graph contains an Eulerian path
- The graph contains a Hamiltonian cycle
Answer :-
7. What is the primary difference between using single quotes, double quotes, and triple quotes to create strings in Python?
- Single and double quotes can only be used for single-line strings, while triple quotes are used for multi-line strings
- Single quotes are used for strings with one word, while double quotes are for strings with multiple words
- Double quotes are more efficient than single quotes for creating strings
- There is no difference in how Python interprets single quotes, double quotes, or triple quotes for strings
Answer :-
8. How many nodes and edges does the following graph have?

- 10,6
- 10,5
- 8,6
- 8,5
Answer :-
9. A complete graph will have a degree of separation?
- 1
- 2
- 3
- Depends on the number of nodes
Answer :-
10. What will be the output of the following code?

- It will print ”Hello”
- It will raise a TypeError
- The string will be updated to ”Hello”
- It will change the first character to uppercase and print ”Hello”
Answer :- For Answers Click Here