mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-11 22:01:07 -04:00
fix(curriculum): Clarifiy the explanation of Python’s // (floor division) operator. (#62297)
Co-authored-by: Dario <105294544+Dario-DC@users.noreply.github.com>
This commit is contained in:
@@ -146,7 +146,7 @@ print('Integer Modulus:', mod_ints) # Integer Modulus: 8
|
||||
print('Float Modulus:', mod_floats) # Float Modulus: 1.1999999999999993
|
||||
```
|
||||
|
||||
Floor division divides two numbers and rounds down the result to the nearest whole number. This is done with the double forward slash operator (`//`):
|
||||
Floor division divides two numbers and returns the greatest integer less than or equal to the result. This is done with the double forward slash operator (`//`):
|
||||
|
||||
```python
|
||||
my_int_1 = 56
|
||||
@@ -276,7 +276,7 @@ What does the double slash (`//`) operator do in Python?
|
||||
|
||||
## --answers--
|
||||
|
||||
It performs floor division, rounding down the result to the nearest whole number.
|
||||
It divides two numbers and returns the greatest integer less than or equal to the result.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user