Variables

4.2. Variables#

The use of computer algebra systems like SymPy is much more powerful, as they’re able to compute expressions with variables.

We need to define variable explicitly, so that the correct object is created. For example, let’s create two variables x and y representing \(x\) and \(y\):

x, y = sym.symbols('x y')
Test yourself!

Review the SymPy documentation and create symbols q1, q2, … q10 using sym.var() without providing a full list of q1, q2, q3, q4, q5, q6, q7, q8, q9, q10. Tip: sym.var() is an extension to sym.symbols.

Click –> Live Code to activate live coding!

sym.var(   )