Python3 confused on arithmetic expressions

Hello, community.

I’m having problems understanding this formula (A//B) to = 2

But I don’t know any math to explain (A//B) = 2?

Python has an operation called floor division. That’s what the // symbol is. Try searching for what that does.

1 Like

In python 3 you have two types of division:

>>> 11 // 4
2
>>> 11 / 4
2.75
>>>

I did this in the Python shell. With two // it does a “floor division” which means it drops the .75 from 2.75. With a regular / it does normal division which produces a decimal point.

1 Like