NPTEL The Joy Of Computing Using Python Assignment 8 Answers (Week 8)
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
Answer: b. Dates = (12,23,3,4)
Follow Sikshapath’s Telegram Channel for instant notifications of further updates.
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
Q4. What will be the output of the following code?
a. facebook
b. gbdfcppl
c. ezbdanni
d. ytvxuhhd
Answer: a. facebook
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.
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.
Q8. What is the output of the following code?
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’, ‘!’]
Q9. While converting an image into black and white during enhancement you cannot convert it back into a colored image.
a. True
b. False
Answer: b. False
Q10. The following code will
a. Converting lower case letters into upper case.
b. Converting upper case letters into lower case.
c. Return the same word
d. Error
Answer: a. Converting lower case letters into upper case.
Disclaimer: These answers are provided only for the purpose to help students to take references. This website does not claim any surety of 100% correct answers. So, this website urges you to complete your assignment yourself.
Also Available:
Data Science for Engineers NPTEL Assignment Solutions Week 8