| 1 | initial version |
Running
for i in range(n):
pari('a[i]')
won't work since 'a[i]' is a string. Try something like this instead:
for i in range(n):
pari('a[%d]' %(i))
This will actually substitute the values i takes on into the string expressions you want to evaluate.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.