The Joy of Computing Using Python Week 6 assignment answers ? Also, we will discuss about the Programming assignment answers of week s. In this article we will discuss about the answers of week 6 of joy of computing. The answers shared here will be on our own knowledge. I am answering these questions with Confident. Please use this answers as reference only.
Also Read: The Joy of Computing Using Python Week 5 Assignment
About Nptel
NPTEL (National Program on Technology Enhanced Learning) is an initiative by the Indian government to provide high-quality education in engineering, science, and humanities to students all over the country. It is a joint venture of the Indian Institutes of Technology (IITs) and the Indian Institute of Science (IISc) to create and distribute educational material in the form of online courses and videos. The courses offered by NPTEL are free of cost and accessible to anyone with an internet connection. NPTEL has played a significant role in improving the quality of technical education in India and has helped millions of students acquire new skills and knowledge.
The Joy of Computing Using Python Week 6 Assignment
Q1. Which of the following is true about recursion?
a. Recursion always performs better than non-recursive code.
b. Recursive Code can be Reused.
c. The base case is necessary for recursion.
d. Recursive code can be shorter than non-recursive code.
Answer: [ b , c , d ]
Q2. If PYTHON is encoded by TCXLSR then DIAMOND will be encoded as?
a. EJBNPOE
b. FKCORPF
c. HMERTSH
D. HMEQSRH
Answer: [ d ] HMEQSRH
Q3. Let L be a list containing different names of movies. Which statement is correct to select a
random movie name from that list L?
a. random.choices(L)
b. random.select(L)
c. random.movie(L)
d. random.random(L)
Answer: [ a ] random.choices(L)
Q4. In the list L = [4,6,7,4,6,2,1], What is the index of element ‘7’?
a. 0
b. 1
c. 2
d. 3
Answer: [ c ] 2
Q5. What will be the output of the following code?
a. Shift every letter in a given word by value.
b. Shift every letter in a given word by 1.
c. Shift every letter in a given word by 26.
d. Returns the same word
Answer: [ a ] Shift every letter in a given word by value.
Q6. Library used to import images?
a. PIL
b. Imageview
c. IMG
d. Image
Answer: [ a ] PIL
Q7. Values of CSV are Separated by ?
a. Commas
b. Colons
c. Semi- colons
d. Slash
Answer: [ a ] Commas
Q8. What will be the output of the following program ?
def recursive(num):
if ( num == 1):
print( ' * ' )
return
if ( num % 2 == 0 ):
print( ' * ' *num )
recursive ( num - 1 )
return
else:
recursive ( num-1 )
return
recursive (10 )
a.
**********
*********
********
*******
******
*****
****
***
**
*
b.
*********
*******
*****
***
*

