+ 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 ??

25th Sep 2018, 2:23 PM
Nadah Khaled
Nadah Khaled - avatar
2 Answers
+ 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
25th Sep 2018, 4:34 PM
Maninder $ingh
Maninder $ingh - avatar