Skip to content

Instantly share code, notes, and snippets.

@sleepingcat4
Created November 10, 2024 10:12
Show Gist options
  • Save sleepingcat4/90e28ca7741bdd2d30aa74dac92051ae to your computer and use it in GitHub Desktop.
Save sleepingcat4/90e28ca7741bdd2d30aa74dac92051ae to your computer and use it in GitHub Desktop.
import numpy as np
from scipy.misc import derivative
def path(x):
return a * x**2 + b * x + c
a = float(input())
b = float(input())
c = float(input())
d = float(input())
speed = derivative(path, d, dx=1e-6)
print(speed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment