From 4e972366d849bfceeb542225813ec90c271dc50b Mon Sep 17 00:00:00 2001 From: Nevan Lowe Date: Thu, 29 Jul 2021 23:21:35 -0400 Subject: [PATCH] int() behavior for negative arguments --- 01_basics/03_basics.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/01_basics/03_basics.ipynb b/01_basics/03_basics.ipynb index db85529..b971611 100644 --- a/01_basics/03_basics.ipynb +++ b/01_basics/03_basics.ipynb @@ -1382,7 +1382,7 @@ } }, "source": [ - "The `int()` function will truncate decimal numbers down." + "The `int()` function will truncate decimal numbers towards zero (down for positive numbers, but up for negative numbers)." ] }, { @@ -1410,7 +1410,7 @@ }, "outputs": [], "source": [ - "int(41.95)" + "int(-41.95)" ] }, {