NPTEL The Joy of Computing using Python Week 7 Assignment Answers 2025
1. What will be the output of the following code?

- 2
- 3
- 4
- Error
Answer :- For Answers Click Here
2. What is the spiral order traversal of the given matrix?

- 1, 2, 3, 7, 11, 10, 9, 5, 6
- 1, 2, 3, 5, 6, 7, 9, 10, 11
- 1, 5, 9, 10, 11, 7, 3, 2, 6
- 1, 5, 9, 2, 6, 10, 3, 7, 11
Answer :-
3. What type of triangle is drawn by the given code?

- Scalar triangle
- Right angle triangle
- Equilateral triangle
- Isosceles triangle
Answer :-
4. Which of the following programs will draw a hexagon?




Answer :-
5. What will be the output of the following code?

- {1: ”one”, 1.0: ”float one”, True: ”boolean one”}
- {1: ”boolean one”}
- {1: ”one”, 1.0: ”float one”}
- {1.0: ”float one”, True: ”boolean one”}
Answer :- For Answers Click Here
6. What is the output of the following code?





Answer :-
7. Which turtle command is equivalent to lifting up a pen?
- penlift()
- penup()
- uppen()
- penremove()
Answer :-
8. Why do we use functions?
- To improve readability.
- To reuse code blocks.
- For the ease of code debugging.
- All of the above.
Answer :-
9. Which library is used to import images?
- PIL
- Imageview
- IMG
- image
Answer :-
10. In Snakes and Ladders, what can be the ways to track ladders and snakes?
- Maintain a dictionary with snake or ladder number blocks as keys.
- Using the if condition to check on every number.
- Both A and B.
- Both A and B.
Answer :- For Answers Click Here