Hi, I want to make a function for a sum that has two different options for each term, depending on a condition. E.g.
F(m) = sum(n=1, 10, if( m*n<0, m*n+2, m*n+8)) How do I put the "else if m*n>0 then m*n+8" into the Sage statement: sum( m*n +2 for n in range(1,10) if m*n<0 ) ? Thank you Kim -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
