t498.py.real.force 962 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. integers
  2. 1
  3. 0
  4. 1
  5. 8
  6. -8
  7. 0.125
  8. -0.125
  9. 1
  10. 2
  11. -1
  12. long integers
  13. 1
  14. 0
  15. 1
  16. 8
  17. -8
  18. 0.125
  19. -0.125
  20. 1
  21. 2
  22. -1
  23. floating point
  24. 1.0
  25. 0.0
  26. 1.0
  27. 29.6741325364
  28. integers and long integers
  29. 8 <type 'long'>
  30. -8 <type 'long'>
  31. 0.125 <type 'float'>
  32. -0.125 <type 'float'>
  33. 3 <type 'long'>
  34. 3 <type 'long'>
  35. integers and floating point
  36. 15.625 <type 'float'>
  37. 11.313708499 <type 'float'>
  38. 0.064 <type 'float'>
  39. 0.0883883476483 <type 'float'>
  40. floating point and long integers
  41. 15.625 <type 'float'>
  42. 11.313708499 <type 'float'>
  43. 0.064 <type 'float'>
  44. 0.0883883476483 <type 'float'>
  45. ERROR CHECKING:
  46. TypeError: unsupported operand type(s) for pow(): 'list' and 'str' on line 53
  47. TypeError: unsupported operand type(s) for pow(): 'list', 'str', 'int' on line 59
  48. ValueError: negative number cannot be raised to a fractional power on line 65
  49. TypeError: pow() 3rd argument not allowed unless all arguments are integers on line 71
  50. TypeError: pow() 2nd argument cannot be negative when 3rd argument specified on line 77