NPTEL The Joy Of Computing Using Python Week 10 Quiz Assignment | NPTEL Swayam Assignment Answers
Join Us On Telegram
👇👇👇👇👇👇👇👇
MCQs (multiple choice questions) Nptel Week 10 Quiz Answers:
Q.1: Which math problem flames is related to? Options are:
(a) kadane's problem
(b) Josephus problem
(c) Conjecture Collatz
(d) Dijkstra Problem
Answer is: (b) Josephus problem
Explantion: In computer science and mathematics, the Josephus problem (or Josephus permutation) is a theoretical problem related to a certain counting-out game.
Q.2: Which of the following is the task of s.upper()(Given the string name is ‘s’)? Options are:
(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.
Answer is: (c) It converts every single character into uppercase.
Q.3: What is the output of the following code?
s = 'The Joy Of Computing'
print(s[:])
Options are:
(a) ‘The Joy of Computing’
(b) ‘ Joy of C’
(c) ‘Joy of C’
(d) Error
Answer is: (a) ‘The Joy of Computing’
Q.4: What will be the output of the following program?
import numpy as np
b=np.array([[1,2]]), [3,4]
print(np.sum(b))
Options are:
(a) [[3, 7]]
(b) [[4, 6]]
(c) [[5, 5]]
(d) [[4, 4]]
Answer is: (b) [[4, 6]]
Q.5: What will be the output of the following program?
s = 'I am amazed'
s.replace('a', 'z')
print(s)
Options are:
(a) I zm zmzzed
(b) I zm zmazed
(c) I am zmzzed
(d) I am amazed
Answer is: (d) I am amazed
Q.6: What are the consequences of image compression? Options are:
(a) Less size
(b) Lower quality
(c) More size
(d) Higher quality
Answer is: (a) Less size
(b) Lower quality
Explanation: Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission.
Q.7: What will be the output of the following program?
s = 'JOY'
print('#'.join(s))
(a) JOC
(b) #J#O#C#
(c) #J#O#C
(d) J#O#C
Answer is: (d) J#O#C
Q.8: How to take a transpose of a matrix? Options are:
Answer is: (b) and (c)
Q.9: 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]])
print(a+b)
What print(a+b) will produce?
Options are:
(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]]
Answer is: (d) [[ 9 11 23]
[14 36 28]]
Q.10: 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))
Options are:
(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
Answer is:
(a) [[ 1 2 3 4]
[ 5 6 7 8]
[ 9 10 11 12]]
If you are facing any queries regarding this assignment solutions, then please drop comment in comment section.
0 Comments