Skip to content

Commit 4ba4631

Browse files
Update docs/Secure-Coding-Guide-for-Python/CWE-682/CWE-1339/README.md
Co-authored-by: myteron <[email protected]> Signed-off-by: BartyBoi1128 <[email protected]>
1 parent 311bce1 commit 4ba4631

File tree

1 file changed

+2
-0
lines changed
  • docs/Secure-Coding-Guide-for-Python/CWE-682/CWE-1339

1 file changed

+2
-0
lines changed

docs/Secure-Coding-Guide-for-Python/CWE-682/CWE-1339/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ print(
2727
```
2828

2929
Because the value of `ITEM_COST` (0.33) cannot be precisely represented in Python due to its nature as a terminating decimal in base 10, the resulting output was as follows:
30+
The unprecise `base 10` representation during the multiplication of `5` with `0.33` results in an `account balance` of `$1.34999999999999993` in the `noncompliant01.py` code.
3031

32+
**Example noncompliant01.py output:**
3133
```text
3234
5 items bought, $0.33 each. Current account balance: $1.34999999999999993
3335
```

0 commit comments

Comments
 (0)