factorisation.py

Created by ississkerrouche67

Created on October 09, 2023

880 Bytes

factorisez, canonisez, trouvez x0, m, x1, x2


from math import sqrt

a = float(input('Saisissez la valeur de a : '))
b = float(input('Saisissez la valeur de b : '))
c = float(input('Saisissez la valeur de c : '))

delta = b**2-(4*a*c)
x0 = (-b)/(2*a)
m = (a*(x0**2))+(b*x0)+c
x1 = float((-b-sqrt(delta))/2*a)
x2 = float((-b+sqrt(delta))/2*a)

canonique = f'La forme canonique est : {a}(x-{x0})+{m}'
if (delta == 0):
    factorisation = f'La forme factorisée est de : {a}(x-{x0})2'
if (delta > 0):
    factorisation = f'La forme factorisée est de : {a}(x-{x1})(x-{x2})'
if (delta < 0):
    factorisation = f'Infactorisable...(delta ={delta})'
print(' ')
print('----------------------')
print(' ')
print(factorisation)
print(canonique)# Press Ctrl+F8 to toggle the breakpoint.
print(f'Avec m = {m}, x0 = {x0}, x1 = {x1}, x2 = {x2} et delta = {delta}')
print(' ')
print('----------------------')
print(' ')

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.