Skip to content
Advertisement

Tag: sage

Nuimberof intersection in a graph

I am doing a project in sagemath, where I have a list like this [(0, 2), (1, 3), (2, 1), (3, 0)]. Which creates a graph below and using that graph it calculates the number of intersecting point as 5(marked in purple color) How do I count this value without graphing it? or with graphing? Answer I find this quite

Conditional expressions in sagemath, when defining a symbolic expression

In SageMath, (version 4.7), I do this in the notebook: and this gives no error. However, after that, dens(1, 1) returns 0, dens(1, 0.5) returns 0, and so on! In fact, I found no way to get the answer 2. What am I doing wrong? Answer You’re using the Sage function declaration syntax — f(x,y) = something-or-other — but on

Advertisement