Hello, On Fri, Aug 29, 2008 at 4:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I want to construct a set of equations using strings. For example: > > for i in range(0,10): > eq1="eq=x^"+str(i)+"-"+str(i)
Is there a reason why you wanted to do it using strings? It's a bit cleaner/easier to do it without strings: sage: eq = var('eq') sage: eqs = [0== x^i - i for i in range(1,10)] sage: eqs [0 == x - 1, 0 == x^2 - 2, 0 == x^3 - 3, 0 == x^4 - 4, 0 == x^5 - 5, 0 == x^6 - 6, 0 == x^7 - 7, 0 == x^8 - 8, 0 == x^9 - 9] But, I doubt that those are the actual equations you want. you just need to modify the eqs = ... line to be what you need. --Mike --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---