Skip to content

Commit f06d085

Browse files
authored
Merge pull request #29 from amcinnes87/patch-1
Fix code to pass string literal to float() instead of int()
2 parents 8a6a41f + 0d89e43 commit f06d085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

practices/ch04_first_lines/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Data is converted to numerical types using the type name (int, float, etc). Here
5555

5656
```python
5757
text = '7.2'
58-
whole_number = int(text) # value = 7
5958
number = float(text) # value = 7.2
59+
whole_number = int(number) # value = 7
6060
```
6161

6262
## Exercises

0 commit comments

Comments
 (0)