Nptel The Joy Of Computing Using Python | NPTEL Week 4 Quiz Assignment | NPTEL Assignment Solutions

NPTEL The Joy Of Computing Using Python Week 4 Quiz Assignment | NPTEL Swayam Assignment Answers


nptel the joy of computing using python


MCQs (multiple choice questions) Nptel Week 4 Quiz Answers:

Q.1: Which of the following statements are true regarding the Magic Squares? (N = Number of rows or columns). Options are:

(a) A Magic Square is always a square matrix.
(b) A Magic Square can or cannot be a square matrix.
(c) The Sum of each row and each column is N(N+1)/2
(d) The Sum of each row and each column is N(N^2 +1)/2.


Answer is (a) A Magic Square is always a square matrix.
                 (d) The Sum of each row and each column is N(N^2 +1)/2.


Q.2: What will be the output of the following code?

what will be the output of the following code?

Options are:

(a) This is a sentence.
(b) Error
(c) No output
(d) The program will not run

Answer is (c) No output



Q.3: A perfect number is a number in which the sum of its proper divisors is equal to that number. For example, 6 is a perfect number as the sum of its divisors 1,2,3 is equal to 6. Which function returns True if the number is perfect?

a perfect number is a number in which the sum of its proper
a perfect number is a number in which the sum of its proper

Answer is : (a)



Q.4: Suppose there is a movie with 3 letters, how many combinations of names are possible? Options are:

(a) 26
(b) 676
(c) 17576
(d) 456976

Answer is (c) 17576


Q.5: What are the possible outputs of the following program? Options are:

what are the possible outputs of the following program?

(a) Any number in the range between 0,4 (Both inclusive).
(b) Any number in the range between 1,4 (Both inclusive).
(c) Any number in the range between 0,5 (Both inclusive).
(d) Any number in the range between 1,5 (Both inclusive).

Answer is (a) Any number in the range between 0,4 (Both inclusive).


Q.6: Birthday Paradox can be simulated with approximately __________ people. Options are:

(a) 365
(b) 100
(c) 40
(d) 20

Answer is (d) 20


Q.7: What is the command to print the last result of the ipython console? Options are:

(a) ‘’
(b)  -
(c)  _
(d) \\

Answer is (c) _ 


Q.8: What will be the output of the following program? Options are:

what will be the output of the following program


(a) Passenger, Starwars
(b) spiderman, jumanji
(c) spiderman, jumanji, Passenger, Starwars
(d) spiderman, Starwars

Answer is (b) spiderman, jumanji


Q.9: In the ‘Dobble Game’, if there are 8 objects on 1 card and 10 objects on another, how many comparisons are possible? Options are:

(a) 8
(b) 10
(c) 18
(d) 80

Answer is (d) 80


Q.10: What will be the output of the following code:


   
what will be the output of the following code

Options are:

(a) Display the number of consonants and name of the movie.
(b) Display the number of letters and name of the movie.
(c) Display the number of vowels and name of the movie.
(d) Display the number of special characters and name of the movie.

Answer is (c) Display the number of vowels and name of the movie.



If you are facing any queries regarding this assignment solutions, then please drop comment in comment section.






Post a Comment

0 Comments