spacepaste

  1.  
  2. >>> from stockTree import *
  3. >>> param = Params(1.2,0.8,0.02)
  4. >>> S0 = Node(None,param,True)
  5. >>> print(S0)
  6. 100
  7. >>> treestock = Tree(8,S0,param)
  8. >>> print(treestock)
  9. 100
  10. 120.0 80.0
  11. 144.0 96.0 96.0 64.0
  12. 172.79999999999998 115.2 115.19999999999999 76.80000000000001 115.19999999999999 76.80000000000001
  13. 207.35999999999999 138.23999999999998 138.24 92.16000000000001 138.23999999999998 92.16 92.16000000000001 61.44000000000001
  14. 248.83199999999997 165.888 165.88799999999998 110.59199999999998 165.888 110.59200000000001 110.59200000000001 73.72800000000001 165.88799999999998 110.59199999999998
  15. 298.59839999999997 199.0656 199.0656 132.71040000000002 199.06559999999996 132.7104 132.71039999999996 88.47359999999999 199.0656 132.71040000000002 132.71040000000002 88.47360000000002
  16. 358.31807999999995 238.87872 238.87872 159.25248 238.87872 159.25248 159.25248000000002 106.16832000000002 238.87871999999993 159.25248 159.25248 106.16832 159.25247999999996 106.16831999999998
  17. 429.98169599999994 286.65446399999996 286.65446399999996 191.102976 286.65446399999996 191.102976 191.10297599999998 127.401984 286.65446399999996 191.102976 191.10297599999998 127.401984 191.102976 127.40198400000003 127.40198400000003 84.93465600000002
  18. Traceback (most recent call last):
  19. File "<pyshell#18>", line 1, in <module>
  20. print(treestock)
  21. TypeError: __str__ returned non-string (type NoneType)
  22.