İ need help // | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

İ need help //

What means // in python?

18th May 2022, 4:50 AM
Spicy Soda
4 Answers
+ 5
Spicy Soda / normal division which returns value in decimal // floor division - returns value as a whole number print (10 / 2) = 5.0 print (10 // 2) = 5 print (11 / 2) = 5.5 print (11 // 2) = 5 print (17 / 2) = 8.5 print (17 // 2) = 8
18th May 2022, 5:15 AM
A͢J
A͢J - avatar
+ 4
#ℍℙ𝟚𝟚™ // is not a single line comment Spicy Soda it's floor division which returns whole number 10//2 = 5 11//2 = 5 17//2 = 8
18th May 2022, 5:11 AM
A͢J
A͢J - avatar
+ 1
Thank you AJ ı understand now thx
18th May 2022, 5:13 AM
Spicy Soda
0
Yeah and -10//3 = - 4 Literally FLOOR division
19th May 2022, 7:29 PM
Grandizer
Grandizer - avatar