Операторы // и % | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Операторы // и %

// - показывает сколько раз одно число может делиться на другое без остатка (полностью) % - показывает лишь остаток в виде целого числа, который остается при полном делении. 8//3 = 2 ( т.е. в 8 может уместиться лишь два раза по три , это 6 ) 8%3 = 2 ( показывает лишь остаток от деления 8 на 3 который не делится на 3 полностью)

17th Sep 2017, 4:35 AM
Teymur Ismayilov S
Teymur Ismayilov S - avatar
1 Answer
+ 6
English Translation: Operators // and% // - shows how many times one number can be divisible by another without a remainder (in full) % - shows only the remainder in the form of an integer, which remains at full division. 8 // 3 = 2 (ie, 8 can only fit two times three, this is 6) 8% 3 = 2 (shows only the remainder of division 8 by 3 which is not divided into 3 completely)
17th Sep 2017, 4:39 AM
qwerty
qwerty - avatar