CoCalc Public Filespub / 3301-3401 / 3352.sagewsOpen with one click!
Authors: Karl-Dieter Crisman, Vincent Delecroix, Amy Feaver, Jason Grout, Andy Huchala, Samuel Lelièvre, Harald Schilly, Vijay Sharma, ℏal Snyder, William A. Stein, and 1 more author...
Description: All published worksheets from http://sagenb.org
Compute Environment: Ubuntu 18.04 (Deprecated)
class VariableGenerator(object): def __init__(self, prefix): self.__prefix = prefix @cached_method def __getitem__(self, key): return SR.var("%s%s"%(self.__prefix,key))
a=VariableGenerator('a')
a[0]
a0
a[1]
a1
p = sum(a[i]*x**i for i in range(10)p)
p
a9*x^9 + a8*x^8 + a7*x^7 + a6*x^6 + a5*x^5 + a4*x^4 + a3*x^3 + a2*x^2 + a1*x + a0