Q:

How does modulo % work in python

I tried 21.1%10.2 the answer was .7 but it should be rather 7.  Can anyone please explain how the answer is .7

A:

It will be .7 only. 
If you divide 21.1 by 10.2 the reminder will be .7. 
21.2 % 10.2 

It could be explain like simple divide of the nos. 
10.2 * 2 =  20.4

21.1 - 20.4 = .7

Hope it will help.