We're dividing 107797 by 40 
Let's see how many times 40 fits into 107797.

Advancing to step 1:
When dividing 1 by 40, we get 0 with a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 1, we get 1.
Take the next digit (0) from the dividend and append it to 1, then repeat: 10 / 40

Moving on to step 2:
40 goes into 10 0 times with a remainder of 10.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 10, we end up with 10.
Bring next digit (7) of the dividend behind the 10 and repeat the process: 107 / 40

Let's proceed to step 3:
When dividing 107 by 40, we get 2 with a remainder of 27.
The next digit of our result is 2. 
Result so far: 2.0
If we take 80 away from 107, we end up with 27.
Bring next digit (7) of the dividend behind the 27 and repeat the process: 277 / 40

Let's proceed to step 4:
When dividing 277 by 40, we get 6 with a remainder of 37.
The next digit of our result is 6. 
Result so far: 26.0
If we take 240 away from 277, we end up with 37.
Bring next digit (9) of the dividend behind the 37 and repeat the process: 379 / 40

On to step 5:
40 can be fit into 379 9 times, resulting in a remainder of 19.
Write down 9 as next digit of the result. 
Result so far: 269.0
If we subtract 360 from 379, we get 19.
Take the next digit (7) from the dividend and append it to 19, then repeat: 197 / 40

On to step 6:
197 divided by 40 is 4 with a remainder of 37.
The number 4 becomes the next digit in our result. 
Result so far: 2694.0
Subtracting 160 from 197 leaves us with 37.
Since there are no more digits in the dividend, we add a zero to the remainder making it 370, and continue the process.

Moving on to step 7:
40 can be fit into 370 9 times, resulting in a remainder of 10.
The next digit of our result is 9. 
Result so far: 2694.9
Deduct 360 from 370 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 8:
40 can be fit into 100 2 times, resulting in a remainder of 20.
Write down 2 as next digit of the result. 
Result so far: 2694.92
Subtract 80 from 100 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 9:
200 divided by 40 is 5 with a remainder of 0.
The next digit of our result is 5. 
Result so far: 2694.925
Deduct 200 from 200 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 2694.925
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 11:
40 goes into 0 0 times with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 2694.925
If we subtract 0 from 0, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

After the division, we end up with 2694.925 and a remainder of 0.0.