+ 1
The Meaning Of // and %
i don't understand what operations are made when i use // and % in numeric operations for example , when i do 1.25 % 0.5 what happened so the answer is 0.25 ??
2 odpowiedzi
+ 1
\ gives exact value of divide.
9\2=4.5
but \\ use for floor division.
9\\2
--------
2| 9 |4
--------
8
--------
1
answer is 4 and here remainder is 1 which can find like this.
9%2=1