We look at the division of 501197 by 5 
Let's see how many times 5 fits into 501197.

Going ahead to step 1:
If we divide 5 by 5, we get 1 and a remainder of 0.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtract 5 from 5 to get 0.
Grab the next digit (0) from the dividend, add it to 0, then carry on: 0 / 5

Going ahead to step 2:
0 divided by 5 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 10.0
Subtracting 0 from 0 leaves us with 0.
Fetch the next digit (1) from the dividend, attach it to 0 and continue: 1 / 5

Moving on to step 3:
If we divide 1 by 5, we get 0 and a remainder of 1.
Record the quotient 0 as the next digit in the result. 
Result so far: 100.0
If we take 0 away from 1, we end up with 1.
Append the next digit (1) from the dividend to 1 and continue with: 11 / 5

Moving on to step 4:
If we divide 11 by 5, we get 2 and a remainder of 1.
The next digit of our result is 2. 
Result so far: 1002.0
The remainder is 1 after subtracting 10 from 11.
Take the next digit (9) from the dividend and append it to 1, then repeat: 19 / 5

Advancing to step 5:
If we divide 19 by 5, we get 3 and a remainder of 4.
The next digit of our result is 3. 
Result so far: 10023.0
Subtract 15 from 19 to get 4.
Grab the next digit (7) from the dividend, add it to 4, then carry on: 47 / 5

On to step 6:
5 can be fit into 47 9 times, resulting in a remainder of 2.
Use 9 as the next digit of our solution. 
Result so far: 100239.0
Subtract 45 from 47 to get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Let's proceed to step 7:
The number 5 fits into 20 4 times, leaving a remainder of 0.
Put 4 as the next digit of the answer. 
Result so far: 100239.4
Deduct 20 from 20 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.

Advancing to step 8:
5 can be fit into 0 0 times, resulting in a remainder of 0.
The next digit of our result is 0. 
Result so far: 100239.4
Subtracting 0 from 0 leaves us 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.

Going ahead to step 9:
0 divided by 5 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 100239.4
If we take 0 away from 0, we end up 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.

The quotient of the division is 100239.4, and the remainder is 0.0.