📑  SageMath Online Mini Campus. Code Set 10

🌀   Homepage     🌀   GitHub Pages     🌀   Previous     🌀   Next     🌀   Instagram Posts     🌀   Pinterest Posts

The set of interactive pages with the following structure:

Example of Computations $\mathbb{\implies}$ Your Experiments $\mathbb{\implies}$ Python Modules $\mathbb{\implies}$ Other Languages

Example of Computations

Click the $\mathbb{activate}$ button below to display an interactive example.


@interact
def _(n=[3,4,5,6]):
    g=Graph({},loops=True,multiedges=True,sparse=True)
    def add(g,x,y):
        g.add_edges([(x,y,'a'),(x,y,'a'),(x,y,'b'),
                     (x,y,'b'),(x,y,'c'),(x,y,'c'),
                     (x,y,'d'),(x,y,'d'),(x,y,'e'),
                     (x,y,'e'),(x,y,'f'),(x,y,'f')])
    [add(g,i,i+1) for i in [1..n-1]] 
    [add(g,i,i+5) for i in [1..n-1]]; add(g,n,1)
    g.graphplot(vertex_size=0,vertex_labels=False,
                color_by_label=True).show(figsize=(5,5))


Your Experiments

Type your own SageMath code lines below and click the $\mathbb{evaluate}$ button.


This code cell was evaluated automatically.



Python Modules


Other Languages (R, HTML, ...)