On Fri, Aug 25, 2017 at 4:03 PM, <santu....@niser.ac.in> wrote: > i am new in sage. and i want to define an array of dimension 79 and every > time i want to save a new value in each array shell i.e. for i in range(79) > a[i]= any value and also i want define a vector. can you help me out? >
I'm not such what your exact question is, but I'll try to answer. Once you have a list L of numbers, say rationals, you can define a vector using the syntax v = vector(QQ,L) To define a list, you can use a command like L = [1/(i^2+1) for in range(79)] More on Python lists can be found here: https://docs.python.org/2/tutorial/datastructures.html Hope this answers your question. > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.