Ask Your Question

Ellis Shamash's profile - activity

2023-06-21 12:37:19 +0100 received badge  Notable Question (source)
2023-06-21 12:37:19 +0100 received badge  Popular Question (source)
2018-06-04 19:27:04 +0100 answered a question The interact gives the error message "TypeError: unsupported operand type(s) for *: 'DiscreteSlider' and 'sage.symbolic.expression.Expression'" when the slider is moved?

I found my error. Sorry.

2018-06-04 19:05:23 +0100 asked a question The interact gives the error message "TypeError: unsupported operand type(s) for *: 'DiscreteSlider' and 'sage.symbolic.expression.Expression'" when the slider is moved?

@interact def piecewise(fx = selector(values=["Two Pieces","Three Pieces"],label="Select Number of Pieces"),

base = slider(vmin=10,vmax=200,step_size=10,default=30,label = "Base Rate = "),

c1= slider(vmin=0.1,vmax=1,step_size=0.1,default=0.6,label="charge_per_unit_tier1 = "),

cd1=slider(vmin=100,vmax=1000,step_size=10,default=700,label="condition_tier1 = "),

c2 = slider(vmin=0.1,vmax=1,step_size=0.1,default=0.9,label="charge_per_unit_tier2 = ")):

f = piecewise( [ [(0,cd1),base+c1*x], [(cd1,1000),base+c1*cd1+c2*(x-cd1) ]] )
show(plot(f,(x,0,1000)),gridlines="minor")
2017-09-01 22:11:50 +0100 asked a question Is there sage software to write exams?

I currently use an exam building software that's in scientific notebook. I was wondering if someone has written something similar in sage.

2017-08-14 00:56:53 +0100 commented answer How do we graph sequences

Thank you very much.

2017-08-14 00:47:58 +0100 commented answer How do we graph sequences

Thank you very much.

2017-08-11 23:31:42 +0100 asked a question How do we graph sequences

For example def agen(max=Infinity): n = 1 an = 1 while n <= max: yield an n += 1 an = (an + 1)/an^2

a = agen(10) for i in a: print i.n() The above print the sequence, but how do I graph it.