Need help with this week’s assignment? Get detailed and trusted solutions for The Joy of Computing using Python Week 1 NPTEL Assignment Answers. Our expert-curated answers help you solve your assignments faster while deepening your conceptual clarity.
✅ Subject: The Joy of Computing using Python
📅 Week: 1
🎯 Session: NPTEL 2025 July-October
🔗 Course Link: Click Here
🔍 Reliability: Verified and expert-reviewed answers
📌 Trusted By: 5000+ Students
For complete and in-depth solutions to all weekly assignments, check out 👉 NPTEL The Joy of Computing using Python Week 1 NPTEL Assignment Answers
🚀 Stay ahead in your NPTEL journey with fresh, updated solutions every week!
The Joy of Computing using Python Week 1 NPTEL Assignment Answers 2025
1. After following the sequence of movements from the glowing scroll, Pixel ends up back at the exact spot where she started.
- True
- False
Answer : For Answers Click Here
2. As Pixel follows the instructions from the mysterious scroll, she traces out a specific shape on the ground. What shape does her path form?
- A square
- A rectangle
- A circle
- A Triangle
Answer :
3. Based on the shape Pixel traces while following the scroll’s instructions, what is the area covered by her path? (in square units)
Answer :
4. Suppose Pixel had turned 120 degrees instead of 90 degrees at each turn while following the scroll’s instructions. What shape would her new path form?
- Rectangle
- An open figure
- Hexagon
- A regular polygon
Answer :
5. Several students at the Scratch Coding Club try to recreate Pixel’s journey using different blocks. Which of the following Scratch code snippets would produce the same path that Pixel traced in her original adventure?




Answer :
6. If Pixel follows a new set of instructions written in the Scratch code below, will she return to the same spot where she started?

- No
- Yes
Answer : For Answers Click Here
7. In the new scenario from the previous question, what shape would Pixel trace as she follows the updated instructions?
- A Rectangle
- A Hexagon
- A Octagon
- An open figure
Answer :
Questions 8-12
A man decides to jog and follow the directions given in the scratch code. Initial Position (x=0,y=0, Direction = 90)

8. What is the total distance travelled by the man?
- 40 units
- 45 units
- 50 units
- 55 units
Answer :
9. What is the displacement of the man from the starting to the final position?
- 20 units
- 15 units
- 24.5 units
- 25.5 units
Answer :
10. In which direction is the man from the initial position at the end?
- South-East
- South-West
- North-West
- East
Answer :
11. What is the position of the man after the second “move”?
- (15, –15)
- (0, –15)
- (–10, –25)
- (−15,−15)
Answer :
12. How many turns did the man make, and how many of them were to the left?
- 3 turns, 3 left
- 4 turns, 2 left
- 3 turns, 2 left
- 2 turns, 1 left
Answer : For Answers Click Here
Questions 13-22
A coder wants to explore how variables, loops, and simple Arithmetic operators work in Scratch. They decide to invent a number sequence where each new term is the sum of the squares of the two previous terms. To test the idea, they start the sequence with 0 and 1, then let a Scratch script update the two variables five times (because the loop is set to run ((4 − x) + 1) times and the default value of x in Scratch is 0). After the loop ends, the sprite(you know what a sprite is if you have used Scratch 🙂 ) “says” the last value it has calculated.

13. What are the first two values placed in the sequence variables?
- x1=1,x2=0
- x1=0,x2=1
- x1=1,x2=1
- x1=0,x2=0
Answer :
14. How many times does the repeat loop run?
- 3
- 4
- 5
- It depends on user input
Answer :
15. Which operation is performed to obtain y inside the loop?
- x1+x2
- x12+x22
- (x1+x2)2
- x1×x2
Answer :
16. What is the value of x2 after the first pass through the loop?
- 0
- 1
- 2
- None (it isn’t set yet)
Answer :
17. Why is the assignment set x1 to x2 necessary?
- It resets the loop counter
- It keeps the two-term window sliding forward
- Without it, the program would crash
- It shortens the repeat count
Answer :
18. After the loop finishes, which variable’s value is spoken by the sprite?
- x1
- x2
- y
- x
Answer :
19. What kind of control structure is demonstrated by the Repeat block?
- Recursion
- Selection
- Iteration
- Parallelism
Answer : For Answers Click Here
20. Which line makes the algorithm state-changing, rather than read-only?
- set y to . . .
- The repeat header
- set x1 to x2
- say x2
Answer :
21. Suppose the loop were changed to run 1 time instead of 5. What number would the sprite say?
- 0
- 1
- 2
- It would not speak at all
Answer :
22. What broad programming concept does this script best illustrate?
- Sorting algorithms
- State machines
- Numerical iteration
- Event broadcasting
Answer :
Questions 23-30

In many programs, it’s important to remember previous values and also to check for special conditions. Two useful tools for this are:
(I) Copy variables: These are used to store a duplicate of a value before it changes, so you can compare or recover it later.
(II) Flag variables: These are Boolean indicators (true/false or 1/0) used to control logic flow. For example, a flag might signal when a specific event has occurred.
23. What is the initial value of current and previous when the program starts?
- Both 1
- current = 1, previous = 0
- Both 0
- They are uninitialized
Answer :
24. What does the changedFlag variable represent in the code?
- Whether the value changed
- The current value
- The difference between numbers
- Total changes counted
Answer : For Answers Click Here
25. What is the role of the previous variable?
- It counts how many times the loop ran
- It stores the value from the last iteration
- It acts like a flag
- It adds to the score
Answer :
26. What kind of variable is changedFlag?
- Loop variable
- Copy variable
- Arithmetic variable
- Flag variable
Answer :
27. What is the purpose of setting previous to current at the end of the loop?
- To reset the loop
- To compare the new value with the last one in the next iteration
- To pick a new random number
- To display the current value
Answer :
28. How many times does the repeat loop run?
- Until flag = 1
- 5
- 10
- It depends on the random value.
Answer :
29. Which block is used to simulate a changing value?
- set current to 0
- set current to pick random 1 to 5
- set previous to current
- say “Value changed!”
Answer :
30. When does the sprite say “Same value”?
- If current is greater than previous.
- If current is not equal to previous.
- If current equals previous.
- If flag is set to 1.
Answer : For Answers Click Here
NPTEL The Joy of Computing using Python Week 1 Assignment Answers 2024
1. Which of the following best defines a variable in programming?
- A constant value that cannot be changed during program execution.
- A named storage location that can hold varying data during program execution.
- An operation that performs arithmetic calculations on data.
- A reserved word is used to define a function or method in a program.
Answer: B
Explanation: A variable is a named memory location that can store data which may change during program execution.
2. Humans easily get bored doing a repetitive job. However, computers are masters of iteration. In programming, we get a control structure that allows a set of instructions to be executed repeatedly based on a condition. It enables automating repetitive tasks by iterating through a block of code until a specific condition is met or for a defined number of times. What is this control structure called?
- Variable
- Operator
- Loop
- Data Type
Answer: C
Explanation: A loop is used to repeat a block of code multiple times until a condition is met, making it ideal for repetitive tasks.
3. Programming logic is different from programming language. Programming languages are many, but programming logic almost remains the same across all programming languages. Which of the following is programming logic?
- Python
- C
- C++
- None of the above
Answer: D
Explanation: Programming logic refers to the reasoning and flow of control in a program, not the language itself.
4. Open-source software, unlike proprietary software, is computer software developed through public, collaborative efforts and made freely available to the public. Which of the following programming languages is/are open source?
- Java
- Python
- FORTRAN
- Perl
Answer: A, B, C, D
Explanation: All these languages have open-source versions or implementations available and are widely used in public development.
5. Knowing how to write a piece of code could help us get things done fast. Choose the areas where we can implement coding.
- Physics
- Mathematics
- Economics
- Small Scale Business
Answer: A, B, C, D
Explanation: Coding is applicable in all these fields for automation, modeling, data analysis, and software solutions.
6. The block of code displayed here is meant for the cat, what is the functionality of this code?

- It brings the ball closer to the cat.
- It makes the cat appear like kicking the ball.
- It makes the cat tumble and rotate
- The code throws an error.
Answer: B
Explanation: Based on the description, the code likely animates the cat in a way that looks like it kicks the ball.
7. The block of code displayed here makes the cat rotate out of impact from the boomeranging ball, how many complete rotations does the cat make?

- One
- Two
- Three
- Four
Answer: C
Explanation: The loop and rotation instructions result in three full 360-degree rotations of the cat.
8. The block of code displayed here makes the cat rotate out of impact from the boomeranging ball, how many loops are there in total?

- One
- Two
- Three
- Four
Answer: B
Explanation: Two loop structures are likely nested or sequentially used in the script for the rotation effect.
9. The block of code displayed here is meant for the ball, how many loops are there in total?

- One
- Two
- Three
- Four
Answer: A
Explanation: Only a single loop is used to control the ball’s movement, probably to make it boomerang once.
10. The block of code displayed here is meant for the ball, if the value beside repeat would have been 1 instead of 2, Select all the statements that explain the situation.

- The Ball would not have returned to Cat.
- Removing the loop from the code would have made no difference in the result.
- The Ball would not have left its original position.
- The code would throw an error
Answer: A, B
Explanation: With just one repeat, the ball might move in only one direction and not return; the loop has limited impact if just once; the code would still execute, so no error occurs.


