NPTEL The Joy of Computing using Python Week 8 Assignment Answers 2025

NPTEL The Joy of Computing using Python Week 8 Assignment Answers 2025

1. What will be the output of the following Python code?

  • ([1, 2, 5], [3, 4])
  • ([1, 2], [3, 4])
  • ([1, 2], [3, 4, 5])
  • TypeError: Tuple object does not support item assignment
Answer :- For Answers Click Here 

2. What operations can be performed on tuples?

  • Tuples are appendable
  • We can delete a value from tuples
  • Both (a) and (b)
  • We can count the number of instances of an element
Answer :- 

3. What will be the output of the following Python code?

  • 1,2,3,4,5
  • 5,4,3,2,1
  • 5,4,3,2
  • 1,2,3,4
Answer :- 

4. What will be the output of the following Python code?

  • facebook
  • gbdfcppl
  • ezbdannj
  • ytvxuhhd
Answer :- 

5. When will the program print ”Clap!”?

  • When both players enter the same letters.
  • When player 2 enters the next letter after player 1.
  • When player 1 enters the next letter after player 2.
  • It will never clap.
Answer :- 

6. What will be the effect of the following Python code on the graph?

  • The graph will go up when guess and pick are the same.
  • The graph will go down when guess and pick are the same.
  • The graph will go up when guess and pick are not the same.
  • Both (b) and (c).
Answer :- For Answers Click Here 

7. What is the primary advantage of using tokenization in Natural Language Processing (NLP)?

  • It allows the model to understand entire sentences as a single entity.
  • It splits text into smaller, manageable units, which helps in processing language more effectively.
  • It eliminates the need for syntactical analysis.
  • It improves the grammatical structure of the text.
Answer :- 

8. What will be the output of the following Python code?

  • [’!’, ’e’, ’e’, ’e’, ’h’, ’h’, ’r’, ’t’, ’y’]
  • [’h’, ’e’, ’y’, ’!’, ’t’, ’h’, ’e’, ’r’, ’e’]
  • [’y’, ’t’, ’r’, ’h’, ’h’, ’e’, ’e’, ’e’, ’!’]
  • None of the above
Answer :- 

9. While converting an image into black and white, can it be converted back into a colored image?

  • True
  • False
Answer :- 

10. What will be the output of the following Python code?

  • Converting lowercase letters into uppercase.
  • Converting uppercase letters into lowercase.
  • Returns the same word.
  • Error.
Answer :- For Answers Click Here 
Scroll to Top