NPTEL The Joy Of Computing Using Python Week 7 Quiz Assignment | NPTEL Swayam Assignment Answers
Q.1: How ladders & snakes are represented by the instructor? Options are:
(a) Through lists.
(b) Through dictionaries.
(c) Through if and elif conditions.
(d) Through sets.
Answer is: (c) Through if and elif conditions.
Q.2: Which of the following is the correct full form of CSV? Options are:
(a) Comma separated values.
(b) Colon separated values.
(c) Semi-Colons separated values.
(d) Tab separated values.
Answer is: (a) Comma separated values.
Q.3: Why do we use functions? Options are:
(a) To improve readability.
(b) To reuse code blocks.
(c) For the ease of code debugging.
(d) For fun.
Answer is: (a) To improve readability.
(b) To reuse code blocks.
(c) For the ease of code debugging.
Q.4: In snakes and ladders, what can be the other ways, except for one used by the instructor, to keep track of ladders and snakes? Options are:
(a) Maintain a dictionary with snakes or ladder number blocks as keys.
(b) Using the if condition to check on every number.
(c) Using lists.
(d) None of the above
Answer is: (a) Maintain a dictionary with snakes or ladder number blocks as keys.
(c) Using lists.
Q.5: Which of the following libraries is used for animation? Options are:
(a) Matplotlib
(b) Turtle
(c) Random
(d) PIL
Answer is: (b) Turtle
Q.6: The spiral animation problem can be broken down into? Options are:
(a) A list.
(b) A 2D table.
(c) A 3D table.
(d) A dictionary.
Answer is: (b) A 2D table.
Q.7: What is the purpose of the GPS program shown in the lectures? Options are:
(a)To show directions to the user.
(b) To track the directions of the user.
(c) To show the way to the user on maps.
(d) None of the above.
Answer is: (b) To track the directions of the user.
Q.8: What does the following program will do after execution?
Options are:
(a) Rename snakesraw.png as snakes.png
(b) Make a copy of snakesraw.png with the name snakes.png
(c) Make a copy of snakesraw.png with the name snakes.jpeg
(d) Throws an error
Answer is: (d) Throws an error
Q.9: Which of the following code will draw a star? Options are:
0 Comments