# The Joy of Computing using Python | NPTEL 2023 | Week 7 Assignment Solutions

This set of MCQ(multiple choice questions) focuses on the The Joy of Computing using Python Week 7 Solutions.

The course carries programming to your work area with stories, similarities and distinguished models. Going reflections to experiences and designing to engineering, the course concentrates fundamentally to rouse the student’s psyche to automatically think intelligently and show up at an answer. As a feature of the course, you will figure out how to practice and culture the craft of programming with Python as a language.

### Course layout

NOTE: You can check your answer immediately by clicking show answer button. The Joy of Computing using Python Week 7 Solutions” contains 10 questions.

Now, start attempting the quiz.

### The Joy of Computing using Python Week 7 Solutions

Q1. Values of CSV files are separated by?

a) Commas
b) Colons
c) Semi-colons
d) Slash

The Joy of Computing using Python Week 7 Solutions

Q2. What is the output of the following code?

a) 1, 2, 3, 7, 11, 10, 9, 5, 6
b) 1, 2, 3, 5, 6, 7, 9, 10, 11
c) 1, 5, 9, 10, 11, 7, 3, 2, 6
d) 1, 5, 9, 2, 6, 10, 3, 7, 11

Answer: c) 1, 5, 9, 10, 11, 7, 3, 2, 6

Q3. What will be the output of the following code?

``````import turtle

pen = turtle.Turtle()

for i in range(3):
pen.forward(60)
pen.right(120)

turtle.done()``````

a) Scalar traingle
b) Right angle triangle
c) Equilateral triangle
d) Isosceles triangle

The Joy of Computing using Python Week 7 Solutions

Q4. Which of the following program will draw a hexagon?

Q5. Which of the following library is used to render data on google maps?

a) gplot
c) gmplot
d) gmeplot

The Joy of Computing using Python Week 7 Solutions

Q6. What is the output of the following code?

Q7. Which turtle command is equivalent to lifting up a pen.

a) penlift()
b) penup()
c) uppen()
d) penremove()

The Joy of Computing using Python Week 7 Solutions

Q8. Why do we use functions?

b) To reuse code blocks.
c) For the ease of code debugging.
d) All of the above

Answer: d)Â All of the above

The Joy of Computing using Python Week 7 Solutions

Q9. Library used to import images?

a) PIL
b) Imageview
c) IMG
d) image

Q10. In snakes and ladder what can be the ways to track ladders and snakes?

a) Maintain a dictionary with snakes or ladder number blocks as keys.
b) Using the if condition to check on every number.
c) Both A and B
d) None of the above

Answer: c) Both A and B

The Joy of Computing using Python Week 7 Solutions

### The Joy of Computing using Python Week 7 Solutions

Q1. How ladders & snakes are represented by the instructor?

a) Through lists.
b) Through dictionaries.
c) Through if and elif conditions.
d) Through sets.

Answer: c) Through if and elif conditions.

The Joy of Computing using Python Week 7 Solutions

Q2. Which of the following is the correct full form of CSV?

a) Comma separated values.
b) Colon separated values.
c) Semi-Colons separated values.
d) Tab separated values.

Q3. Why do we use functions?

b) To reuse code blocks.
c) For the ease of code debugging.
d) For fun.

The Joy of Computing using Python Week 7 Solutions

Q4. In snakes and ladders, what can be the other ways, except for one used by the instructor, to keep track of ladders and snakes?

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

Q5. Which of the following libraries is used for animation?

a) Matplotlib
b) Turtle
c) Random
d) PIL

The Joy of Computing using Python Week 7 Solutions

Q6. The spiral animation problem can be broken down into?

a) A list
b) A 2D table
c) A 3D table
d) A dictionary

Q7. What is the purpose of the GPS program shown in the lectures?

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: b) To track the directions of the user.

The Joy of Computing using Python Week 7 Solutions

Q8. What does the following program will do after execution?

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: b) Make a copy of snakesraw.png with the name snakes.png

The Joy of Computing using Python Week 7 Solutions

Q9. Which of the following code will draw a star?

Q10. Which method is used to fill color in shapes drawn by the turtle?

a) color
b) fillcolor
c) changecolor
d) putcolor

`DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.`