From 0d89e43df486bbc4aed60dfdd68256a5e6e73dff Mon Sep 17 00:00:00 2001 From: amcinnes87 <75340385+amcinnes87@users.noreply.github.com> Date: Sun, 6 Dec 2020 13:48:40 -0800 Subject: [PATCH] Fix code to pass string literal to float() instead of int() Triggers an exception when you call `int("7.2")`. --- practices/ch04_first_lines/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/practices/ch04_first_lines/readme.md b/practices/ch04_first_lines/readme.md index 7fbb3ba..65268ef 100644 --- a/practices/ch04_first_lines/readme.md +++ b/practices/ch04_first_lines/readme.md @@ -55,8 +55,8 @@ Data is converted to numerical types using the type name (int, float, etc). Here ```python text = '7.2' -whole_number = int(text) # value = 7 number = float(text) # value = 7.2 +whole_number = int(number) # value = 7 ``` ## Exercises