coding the fibonacci sequence

num = 1
num1 = 0
num2 = 1
import time
for i in range(0, 10):
    print(num)
    num = num1 + num2
    num1 = num2
    num2 = num
    time.sleep(1)

Here is what the above code is Doing:
1. It’s creating a variable called num and setting it to 1.
2. It’s creating a variable called num1 and setting it to 0.
3. It’s creating a variable called num2 and setting it to 1.
4. It’s using a for loop to loop 10 times.
5. It’s printing the value of num.
6. It’s setting num to the value of num1 + num2.
7. It’s setting num1 to the value of num2.
8. It’s setting num2 to the value of num.
9. It’s using the time.sleep() function to pause for 1 second.