This article focuses on the NPTEL Joy Of Computing Using Python Week 7 Assignment Answers. If you didn't complete the Week 6 NPTEL Joy Of Computing, the link is below. The answers are 100% correct according to my source, and you are free to change the answers to your own choice.
Also Read: NPTEL Joy Of Computing Using Python Week 6 Assignment Answers
Also Read: NPTEL Joy Of Computing Using Python Week 6 Assignment Answers
Join us on Telegram 👉 CLICK HERE
In Week 7, the following topics are discussed:
Answer: [ B ] 3
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 type of triangle is drawn by the given code?
A. Scalar triangle
B. Right angle triangle
C. Equilateral triangle
D. Isosceles triangle
Answer: [ C ] Equilateral triangle
Q5. What will be the output of the following code?
A. {1: ”one”, 1.0: ”float one”, True: ”boolean one”}
B. {1: ”boolean one”}
C. {1: ”one”, 1.0: ”float one”}
D. {1.0: ”float one”, True: ”boolean one”}
Answer: [ B ] {1: ”boolean one”}
Q8. Why do we use functions?
A. To improve readability.
B. To reuse code blocks.
C. For the ease of code debugging.
D. All of the above.
Answer: [ D ] All of the above
Q9. Which library is used to import images?
Q10. In Snakes and Ladders, what can be the ways to track ladders and snakes?
NPTEL Joy Of Computing Using Python Week 7 Assignment 2025
- Snake and ladders - Not on Board
- Spiral Traversing - Let's Animate
- GPS - Track the route
Last Date: 12-03-2025
Q1. What will be the output of the following code?
my_dict = {1: 2, 2: 3, 3: 4}
x = my_dict[ my_dict[1]]print(x) {codeBox}
A. 2
B. 3
C. 4
D. Error
Q2. What is the spiral order traversal of the given matrix?
def spiral(row, column, arr):rowStart=0; columnStart=0while (rowStart < row and columnStart < column):for i in range(rowStart, row):print(arr[i][columnStart], end =" ")columnStart = columnStart + 1for i in range (columnStart, column):print(arr[row-1][i], end=' ')row = row- 1if (rowStart < row):for i in range(row-1, rowStart-1, -1):print(arr[i][column-1], end = " " )column = column - 1if (columnStart < column):for i in range(column-1, columnStart-1, -1):print(arr[rowStart][i], end = " ")rowStart=rowStart+1matrix = [[1, 2, 3],[5, 6, 7],[9, 10, 11]]row= 3column= 3spiral(row, column, matrix) {codeBox}
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 type of triangle is drawn by the given code?
import turtlepen = turtle.Turtle()for i in range(3):pen.forward(60)pen.right(120)
turtle.done() {codeBox}
A. Scalar triangle
B. Right angle triangle
C. Equilateral triangle
D. Isosceles triangle
Answer: [ C ] Equilateral triangle
Q4. Which of the following programs will draw a hexagon?
Answer: [ B ] Hexagon
A.
C.
Q5. What will be the output of the following code?
my_dict = {}my_dict[1] = "one"my_dict[1.0] = "float one"my_dict[True] = "boolean one"print (my_dict) {codeBox}
A. {1: ”one”, 1.0: ”float one”, True: ”boolean one”}
B. {1: ”boolean one”}
C. {1: ”one”, 1.0: ”float one”}
D. {1.0: ”float one”, True: ”boolean one”}
Answer: [ B ] {1: ”boolean one”}
Q6. What is the output of the following code?
Q7. Which turtle command is equivalent to lifting up a pen?
import turtlepen = turtle.Turtle()for i in range(3):pen.right(60)pen.forward(60)pen.penup()pen.right(60)pen.forward(60)pen.pendown()turtle.done() {codeBox}
Answer: [ D ]
Q7. Which turtle command is equivalent to lifting up a pen?
A. penlift()
B. penup()
C. uppen()
D. penremove()
Answer: [ B ] penup()
B. penup()
C. uppen()
D. penremove()
Answer: [ B ] penup()
Q8. Why do we use functions?
A. To improve readability.
B. To reuse code blocks.
C. For the ease of code debugging.
D. All of the above.
Answer: [ D ] All of the above
Q9. Which library is used to import images?
A. PIL
B. Imageview
C.IMG
D. image
Answer: [ A ] PIL
B. Imageview
C.IMG
D. image
Answer: [ A ] PIL
Q10. In Snakes and Ladders, what can be the ways to track ladders and snakes?
A. Maintain a dictionary with snake or ladder number blocks as keys.
B. Using the if condition to check on every number.
C. Both A and B.
D. Both A and B.
B. Using the if condition to check on every number.
C. Both A and B.
D. Both A and B.
Answer: [ C ] Both A and B
Conclusion
Also Read: NPTEL Joy Of Computing Using Python Week 6 Assignment Answers
Join us on Telegram 👉 CLICK HERE