Skip to content

Commit 40766e8

Browse files
authored
Merge pull request #200 from LibraryCarpentry/chennesy-patch-4
Add print statements for type() output
2 parents b3d4025 + ae9e8d4 commit 40766e8

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎episodes/variables.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,17 @@ Everything in Python is some type of object and every Python object will be of a
149149
You can use the built-in Python function `type()` to find out an object's type.
150150

151151
```python
152-
print(type(140.2),
153-
type(age),
154-
type(name),
155-
type(print))
152+
print(type(140.2))
153+
print(type(age))
154+
print(type(name))
155+
print(type(print))
156156
```
157157

158158
```output
159-
<class 'float'> <class 'int'> <class 'str'> <class 'builtin_function_or_method'>
159+
<class 'float'>
160+
<class 'int'>
161+
<class 'str'>
162+
<class 'builtin_function_or_method'>
160163
```
161164

162165
1. 140.2 is an example of a floating point number or `float`. These are fractional numbers.

0 commit comments

Comments
 (0)