What's the difference between /and// operation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the difference between /and// operation

12th Dec 2019, 7:01 PM
___Eli__
___Eli__ - avatar
2 Answers
+ 2
The / operator actually performs a real division, providing a real number result. The // operator performs a so called floor division, where the division is performed and it is rounded to the smaller integer number. It is also called the integer division, as ๐•ต๐–†๐–“ ๐•ธ๐–†๐–—๐–๐–š๐–˜ stated. Happy coding!
12th Dec 2019, 8:53 PM
Gonรงalo Magalhaes
Gonรงalo Magalhaes - avatar
0
Thanks
13th Dec 2019, 4:58 AM
___Eli__
___Eli__ - avatar