502517 divided by 5 
The aim is to understand the frequency of 5 in 502517.

Step 1:
The number 5 fits into 5 1 times, leaving a remainder of 0.
Put 1 as the next digit of the answer. 
Result so far: 1.0
If we take 5 away from 5, we end up with 0.
Grab the next digit (0) from the dividend, add it to 0, then carry on: 0 / 5

Moving on to step 2:
When dividing 0 by 5, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 10.0
Deduct 0 from 0 and we're left with 0.
Take the next digit (2) from the dividend and append it to 0, then repeat: 2 / 5

Step 3:
5 goes into 2 0 times with a remainder of 2.
Put 0 as the next digit of the answer. 
Result so far: 100.0
The remainder is 2 after subtracting 0 from 2.
Fetch the next digit (5) from the dividend, attach it to 2 and continue: 25 / 5

Step 4:
25 divided by 5 is 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 1005.0
If we subtract 25 from 25, we get 0.
Fetch the next digit (1) from the dividend, attach it to 0 and continue: 1 / 5

Step 5:
1 divided by 5 is 0 with a remainder of 1.
Record the quotient 0 as the next digit in the result. 
Result so far: 10050.0
Subtract 0 from 1 to get 1.
Fetch the next digit (7) from the dividend, attach it to 1 and continue: 17 / 5

Moving on to step 6:
If we divide 17 by 5, we get 3 and a remainder of 2.
The number 3 becomes the next digit in our result. 
Result so far: 100503.0
Subtracting 15 from 17 leaves us with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Moving on to step 7:
When dividing 20 by 5, we get 4 with a remainder of 0.
The next digit of our result is 4. 
Result so far: 100503.4
Subtracting 20 from 20 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 8:
5 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 100503.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.

Step 9:
0 divided by 5 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 100503.4
The remainder is 0 after subtracting 0 from 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 final outcome is 100503.4, with a leftover of 0.0.