Post Reply 
Moving from 200LX SOLVER to SAGEmath *)
01-11-2015, 12:30 PM (This post was last modified: 01-11-2015 12:32 PM by Peter A. Gebhardt.)
Post: #2
RE: Moving from 200LX SOLVER to SAGEmath *)
Answering myself - Python's identation and variable naming were the stoppers ;-)

Not being allowed to use the % character in variable names, makes developing self-documenting code for financial tasks in SAGEmath a bit harder too.

(print statements added to visualize decision tree)

Code:
var ('S, Save1, _AgSvTarget, _AgSvNow')
_AgSvTarget=5; _AgSvNow=3.0; S=1; Save1=0.0

if S == 1: 
    if Save1 == 0:
        print 1,  1/(1 + _AgSvTarget/100)
    else:
        print 2,  1/(1 + _AgSvNow/100)        
else:    
    print 3,  1/(1 + _AgSvNow/100)

Best regards
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Moving from 200LX SOLVER to SAGEmath *) - Peter A. Gebhardt - 01-11-2015 12:30 PM



User(s) browsing this thread: 1 Guest(s)