tangent2e.py

Created by maeldepallens

Created on November 22, 2021

1.66 KB


# Type your text here
def tangent2e():
    print("")
    print("Quelle est ta fonction")
    print("")
    a = float(input("Choix de a : "))
    b = float(input("Choix de b : "))
    c = float(input("Choix de c : "))
    d = float(input("Antécedent du nombre dérivé : "))
    A = str(a)
    B = str(b)
    C = str(c)
    D = str(d)
    nb = (2*a*d)+b
    print("")
    print("")
    print("f("+D+"+h) = "+A+"("+D+"+h)**2+"+B+"("+D+"+h)+"+C)
    print("f("+D+"+h) = "+A+"("+str(d**2)+"+"+str(2*d)+"h"+"+h**2)+"+str(b*d)+"+"+B+"h+"+C)
    print("f("+D+"+h) = "+str((d**2)*a)+"+"+str(2*d*a)+"h"+"+"+A+"h**2+"+str(b*d)+"+"+B+"h+"+C)
    print("f("+D+"+h) = "+str(((d**2*a)+(b*d)+c))+"+"+str((2*d*a)+b)+"h"+"+"+A+"h**2")
    print("")
    print("")
    print("f("+D+") = "+A+"*"+D+"**2+"+B+"*"+D+"+"+C)
    print("f("+D+") = "+str(a*(d**2))+"+"+str(b*d)+"+"+C)
    print("f("+D+") = "+str(a*(d**2)+b*d+c))
    print("")

    s = str(str(((d**2*a)+(b*d)+c))+"+"+str((2*d*a)+b)+"h"+"+"+A+"h**2")
    p = str(str(a*(d**2)+b*d+c))
    print("t = "+"("+s+"-"+p+")/h")
    print("t = ("+str((2*d*a)+b)+"h"+"+"+A+"h**2)/h")
    print("t = "+str((2*d*a)+b)+"+"+A+"h")
    print("")
    x = a*d*2+b
    print("lim t = "+str((2*d*a)+b))
    print("h→0")
    print("")
    print("f'("+D+") = "+str((2*d*a)+b))
    print("")
    print("")
    print("On sait que le coefficient directeur est egal au nombre derivé donc :")
    print("")
    print("y = "+str(nb)+"x+b")
    print(str(a*(d**2)+b*d+c)+" = "+str(nb)+"*"+D+"+b")
    print("b = "+str(a*(d**2)+b*d+c)+"-"+str(nb*d))
    print("b = "+str((a*(d**2)+b*d+c)-(nb*d)))
    print("")
    print("y = "+str(nb)+"x+"+str((a*(d**2)+b*d+c)-(nb*d)))

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.