
Are you looking for help in Joy of Computing using Python NPTEL Week 3 Assignment Answers? So, here in this article, we have provided Joy of Computing using Python week 3 Assignment Answer’s hint.
NPTEL The Joy of Computing using Python Assignment Answers Week 3
Q1. Which of the following statements describes the challenge ‘Fizz Buzz’?
a. Multiples of 3 should print buzz, multiples of 5 should print fizz, and multiples of 3 and 5 should print fizz buzz.
b. Multiples of 3 should print fizz, multiples of 5 should print buzz, and multiples of 3 or 5 should print fizz buzz.
c. Multiples of 3 should print fizz, multiples of 5 should print buzz, and multiples of 3 and 5 should print fizz buzz.
d. Multiples of 3 should print buzz, multiples of 5 should print fizz, and multiples of 3 and 5 should print fizz buzz.
Answer: c. Multiples of 3 should print fizz, multiples of 5 should print buzz, and multiples of 3 and 5 should print fizz buzz.
For instant notification of any updates, Join us on telegram.
Q2. random.randint(1,100) will generate a number _________.(assume random is imported)
a. Between 1,100 both inclusive.
b. Between 1,100 both exclusive.
c. Between 1,100 only 100 inclusive.
d. Between 1,100 only 1 inclusive.
Answer: a. Between 1,100 both inclusive.
Q3. Consider a string of 20 digits initialized with all zeros as a DNA sequence, in the context of lectures, updating a random ‘zero’ as ‘one’ implies ___.
a. Updating a random number
b. Evolution
c. Degradation
d. Increase
Answer: b. Evolution
Q4. Which of the following method is correct to add an element at a specific position?
a. insert()
b. add()
c. append()
d. index()
Answer: a. insert()
Q5. What will be the output of the following program?
L=['Python', 'C++', 'Java', 'Kotlin']
for lang in range(len(L)):
print(lang)
a. Python, C++, Java, Kotlin
b. 0, 1, 2, 3
c. 0, 1, 2, 3, 4
d. Python, C++, Java
Answer: b. 0, 1, 2, 3
Q6. Which of the following methods is correct to count the number of instances on an element in a list?
a. total()
b. sum()
c. count()
d. numberof()
Answer: c. count()
Q7. In the Fizz Buzz game, What will be the output if the number is 285?
a. Fizz
b. Buzz
c. Fizz Buzz
d. No output
Answer: c. Fizz Buzz
Q8. Which of the following keywords is used to define a function in python?
a. func
b. function
c. define function
d. def
Answer: d. def
Q9. Which of the following statements are true about crowd-sourcing?
a. Answers received via crowdsourcing are never correct.
b. Answers received via crowdsourcing can be as good as the answer by an expert.
c. Answers received via crowdsourcing can be better than the answer by an expert.
d. Answers received via crowdsourcing are always correct.
Answer: b. Answers received via crowdsourcing can be as good as the answer by an expert.
c. Answers received via crowdsourcing can be better than the answer by an expert.
Q10. Which of the following commands is not correct in order to generate a graph?
a. import matplotlib.pyplot as plt
plt.plot([1,2,3,4],[5,6,7,8],ro)
b. import matplotlib.pyplot as plt
plt.plot([1,2,3,4],[5,6,7,8],r–)
c. import matplotlib.pyplot as plt
plt.plot([1,2,3,4],[5,6,7,8],bs)
d. import matplotlib.pyplot as plt
plt.plot([1,2,3,4],[5,6,7,8],r—)
Answer: d. import matplotlib.pyplot as plt
plt.plot([1,2,3,4],[5,6,7,8],r—)
TELEGRAM FOR NOTIFICATION | Click Here |
Follow on Google News (in one click) | Click Here |
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:
NPTEL The Joy of Computing using Python Assignment Answers Week 2
NPTEL The Joy of Computing using Python Assignment Answers Week 4