Advertisement
rdrewd-facebook

Untitled

Aug 4th, 2012
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.64 KB | None | 0 0
  1. [GCC 4.5.3] on cygwin
  2. Type "help", "copyright", "credits" or "license" for more information.
  3. >>> math.sqrt(9)
  4. Traceback (most recent call last):
  5.   File "<stdin>", line 1, in <module>
  6. NameError: name 'math' is not defined
  7. >>> import math
  8. >>> math.sqrt(9)
  9. 3.0
  10. >>> math.sqrt('x')
  11. Traceback (most recent call last):
  12.   File "<stdin>", line 1, in <module>
  13. TypeError: a float is required
  14. >>> math.sqrt('9')
  15. Traceback (most recent call last):
  16.   File "<stdin>", line 1, in <module>
  17. TypeError: a float is required
  18. >>> math.sqrt('9.0')
  19. Traceback (most recent call last):
  20.   File "<stdin>", line 1, in <module>
  21. TypeError: a float is required
  22. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement