The modulo operator (%) returns the remainder of integer division of two numbers. It is very common to use when you want to know if a number is even or odd.
# 6% 2 == 0
# 5% 2 == 1
All that follows the # sign is a comment, 6% 2 returns 0 , 6 is even number. Otherwise, 5, the remainder is 1.
Operator Division:
5 / 2 # == 2
This is because when you divide two integers the result is an integer, to get the real value, at least one operand must be floating
5 / 2.0 # == 2.5
integer division operator:
5 / / 2 # == 2
5 / / 2.0 == 2.0 #
5 / / 3.33 # == 1.0
This operator does not show decimals, nothing but the whole.
A week ago I had a problem with my DD, who spent all of my files have the extension. Chk These files are created by the chkdsk that came bundled with the OS, were created to detect a logical error in the DD, to be with extesion. chk not have access to the original file, but! There is a tool that is very OOD to these problems and others who come to the case mentioned. GetDataBack The program is able to revert to the original files and best of all, it retrieves the directory, q thing to do other programs fail. The program is in 2 versions FAT and NTFS. recover So while there is no data to delete the files. Chk In my case the DD that bug me is 160 Gb 12 Gb had nothing but free, it is tedious to do these things without another hard disk of the same capacity or higher. At this moment I am backing up important files super. If you suffer these problems, just look GetDataBack and it is solved. Greetings.