Diana G.

asked • 06/30/20

How to create a variable on sage?

Create a variable called “weights”. This variable will be a list of lists. The “zeroth” list will be a list of all the weights from node zero to all the other nodes. The “first” list will be a list of all the weights from node one to all the other nodes.


Using weights from my list:

[0,1] = 24

[0,2] = 16

[0,3] = 4

[0,4] = 1

[1,0] = 24

[1,2] = 5

[1,3] = 1

[1,4] = 6

[2,0] = 16

[2,1] = 5

[2,3] = 15

[2,4] = 7

[3,0] = 4

[3,1] = 1

[3,2] = 15

[3,4] = 2

[4,0] = 1

[4,1] = 6

[4,2] = 7

[4,3] = 2

1 Expert Answer

By:

Ronald B. answered • 06/30/20

Tutor
New to Wyzant

College Graduate

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.