Jump to content

Black

Neophyte
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Black

  1. Ребят, такая проблема, у меня есть HTML шаблон, и в него мне нужно импортировать простенький код Sage. Задумка была такая, чтобы там была кнопка, запускающая код Sage. Но почему то не работает, помогите пожалуйста Заранее спасибо. Вот код в Sage:

    f(x) = x^3 - x
    f_p(x) = diff(f(x), x)
    @interact
    def tap(x_0 = slider(-10, 10, 0.1, 0)):
        y_0 = f(x_0)
        m = f_p(x_0)
        b = y_0 - m*x_0
        P1 = plot(f(x), -2, 2, rgbcolor=(0, 1, 0))
        P2 = plot(m*x + b, -2, 2, color = 'red')
        P3 = point([y_0, x_0], color='blue', size = 200)
        P = P1 + P2 + P3
        P.show()
     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy