# NPTEL The Joy of Computing using Python Assignment Answers Week 10 2022

Students, are you facing any issue while solving NPTEL the joy of computing using python week 10 assignment? If yes, then you can scroll down to get answers to the all 10 questions of this assignment.

## NPTEL The Joy of Computing using Python Assignment Answers Week 10

Q1. Which math problem flames is related to?

b. Josephus problem
c. Conjecture Collatz
d. Dijkstra Problem

1100+ Students helped through instant notifications on telegram.

Q2. Which of the following is the task of s.upper()(Given the string name is ‘s’)?

a. It converts the first character into uppercase.

b. It converts every vowel into uppercase.

c. It converts every single character into uppercase

d. It converts consonants into uppercase.

Q3. What is the output of the following code?

``s = 'The Joy of Computing' print(s[:])``

a. ‘The Joy of Computing’

b. ‘ Joy of C’

c. ‘Joy of C’

d. Error

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

``````import numpy as np
b = np.array([[1, 2]]), [3, 4]
print(np.sum(b))``````

a. [[3, 7]]

b. [[4, 6]]

c. [[5, 5]]

d. [[4, 4]]

Q5. What will be the output of the following program?

``````s = 'I am amazed'
s.replace('a', 'z')
print(s)``````

a. I zm zmzzed

b. I zm zmazed

c. I am zmzzed

d. I am amazed

Q6. What are the consequences of image compression?

a. Less size

b. Lower quality

c. More size

d. Higher quality

Q7. What will be the output of the following program?

``````S = 'JOC'
print('#'.join(s))``````

a. JOC

b. #J#O#C#

c. #J#O#C

d. J#O#C

Q8. How to take a transpose of a matrix?

``````a. import numpy as np
b = np.array([[1,2],[3,4]])
print(b.T())

b. import numpy as np
b = np.array([[1,2],[3,4]])
print(b.transpose())

c. importnumpy as np
b = np.array([[1,2], [3,4]])
print(b.T)

d. import numpy as np
b = np.array([[1,2], [3,4]])
print (b.transpose)``````

Q9. Consider the following code.

``````import numpy as np
a = np.array([[8,9,20], [10,31,22]])
b = np.array([[1,2,3],[4,5,6]])``````

What print(a+b) will produce?

a. [[6 6 6]

[6 6 6]]

b. [[ -7 -7 -17]

[ -6 -26 -16]]

c. [[ 7 7 17]

[ 6 26 16]]

d. [[ 9 11 23]

[14 36 28]]

Q10. what is the output of the following code?

``````import numpy as np
a = np.array([1,2,3,4,5,6,7,8,9,10,11,12])
print(a.reshape(3,4))``````

a. [[ 1 2 3 4]

[ 5 6 7 8]

[ 9 10 11 12]]

b. [[ 1 2 3]

[ 4 5 6]

[ 7 8 9]

[10 11 12]]

c. Error

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 9