Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [GCC 4.5.3] on cygwin
- Type "help", "copyright", "credits" or "license" for more information.
- >>> math.sqrt(9)
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- NameError: name 'math' is not defined
- >>> import math
- >>> math.sqrt(9)
- 3.0
- >>> math.sqrt('x')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: a float is required
- >>> math.sqrt('9')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: a float is required
- >>> math.sqrt('9.0')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: a float is required
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement