# The Joy of Computing using Python | NPTEL 2023 | Week 8 Assignment Solutions

This set of MCQ(multiple choice questions) focuses on the The Joy of Computing using Python Week 8 Solutions.

The course carries programming to your work area with stories, similarities and distinguished models. Going reflections to experiences and designing to engineering, the course concentrates fundamentally to rouse the student’s psyche to automatically think intelligently and show up at an answer. As a feature of the course, you will figure out how to practice and culture the craft of programming with Python as a language.

### Course layout

NOTE: You can check your answer immediately by clicking show answer button. The Joy of Computing using Python Week 8 Solutions” contains 10 questions.

Now, start attempting the quiz.

### The Joy of Computing using Python Week 8 Solutions

Q1. What is the correct initialisation of tuples?

a) Dates = [12,23,3,4]
b) Dates = (12,23,3,4)
c) Dates = {12,23,3,4}
d) Both B and C

The Joy of Computing using Python Week 8 Solutions

Q2. What operations can be done on tuples?

a) Tuples are appendable.
b) We can delete a value from tuples.
c) Both A and B.
d) We can count the number of instances of an element.

Answer: d)Â We can count the number of instances of an element.

Q3. What will be the output of the following code?

``````t = (1, 2, 3, 4, 5)
for i in range(-1, -len(t), -1):
print(t[i])``````

a) 1, 2, 3, 4, 5
b) 5, 4, 3, 2, 1
c) 5, 4, 3, 2
d) 1, 2, 3, 4

Answer: c) 5, 4, 3, 2

The Joy of Computing using Python Week 8 Solutions

Q4. What will be the output of the following code?

b) gbdfcppl
c) ezbdannj
d) ytvxuhhd

Q5. When the following program will clap?

a) When both players will enter the same letters.
b) When player 2 will enter the next letter with respect to player 1.
c) When player 1 will enter the next letter with respect to player 2.
d) It will never clap.

Answer: b) When player 2 will enter the next letter with respect to player 1.

The Joy of Computing using Python Week 8 Solutions

Q6. Which statement is correct about the following program?

a) The graph will go up when guess and pick are the same.
b) The graph will go down when guess and pick are the same.
c) The graph will go up when guess and pick are not the same.
d) Both B and C

Answer: d)Â Both B and C

Q7. What does NLTK do?

a) Helps to work with human language data.
b) Helps to convert machine data into human language.
c) Helps to work on gibberish language.
d) Helps to translate dog language into human language.

Answer: a) Helps to work with human language data.

The Joy of Computing using Python Week 8 Solutions

Q8. What is the output of the following code?

``````string = 'hey!there'
a = sorted(string)
a.reverse()
print(a)``````

a) [‘!’, ‘e’, ‘e’, ‘e’, ‘h’, ‘h’, ‘r’, ‘t’, ‘y’]
b) [‘h’, ‘e’, ‘y’, ‘!’, ‘t’, ‘h’, ‘e’, ‘r’, ‘e’]
c) [‘y’, ‘t’, ‘r’, ‘h’, ‘h’, ‘e’, ‘e’, ‘e’, ‘!’]
d) None of the above

Answer: c) [‘y’, ‘t’, ‘r’, ‘h’, ‘h’, ‘e’, ‘e’, ‘e’, ‘!’]

The Joy of Computing using Python Week 8 Solutions

Q9. While converting an image into black and white during enhancement you cannot convert it back into a colored image.

a) True
b) False

Q10. How does vader help in sentiment analysis?

a) It calculates whether the statement is negative, positive or neutral.
b) It takes care of the intensity of a statement.
c) Both A and B
d) None of the above

Answer: c) Both A and B

The Joy of Computing using Python Week 8 Solutions

### The Joy of Computing using Python Week 8 Solutions

Q1. Which of the following q43 the correct representation of tuples?

a) [1,2,3,4]
b) (1,2,3,4)
c) ((1), (2), (3), (4))
d) [[1], [2], [3], [4]]

The Joy of Computing using Python Week 8 Solutions

Q2. Why gambling is not recommended?

a) Because you lose every time.
b) Because you win every time.
c) Because the loss amount is greater than the winning amount over time.
d) Because the winning amount is greater than the loss amount over time.

Answer: c) Because the loss amount is greater than the winning amount over time.

Q3. Which of the following programs will print the exact same word?

Q4. Using which of the following methods a person can store over a million images in small digital storage?

a) Decompression
b) Compression
c) Enhancement
d) Unzip

Q5. State True or False, A lot of information can be revealed from images by using the right kind of enhancement.

a) True
b) False

The Joy of Computing using Python Week 8 Solutions

Q6. type(10) will return?

a) int
b) str
c) float
d) list

Q7. Which of the following pair of words are anagrams?

a) A gentleman, Elegant man
b) Cat, Arc
c) Looted, Toledo
d) Monasteries, Aman stories

The Joy of Computing using Python Week 8 Solutions

Q8. Using PIL how an image â€˜imgâ€™ can be flipped?

a) img.flip()
b) img.rotate()
c) img.transpose()
d) img.turn()

The Joy of Computing using Python Week 8 Solutions

Q9. What is the purpose of NLTK?

a) To process binary language.
b) To process foreign language.
c) To process human language.
d) To process only Hindi language

Answer: c) To process human language.

Q10. How does Vader help in sentiment analysis?

a) It calculates whether the statement is negative, positive, or neutral.
b) It takes care of the intensity of a statement.
c) Both A and B
d) None of the above

Answer: c) Both A and B

The Joy of Computing using Python Week 8 Solutions

<< Prev- The Joy of Computing using Python Week 7 Assignment Solutions

>> Next- The Joy of Computing using Python Week 9 Assignment Solutions

`DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.`

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.