tp15_2de_corr.py

Created by jean-luc-poncin

Created on March 06, 2022

280 Bytes


from math import *

def f(x):
  return(5*x-21)
  
def ls():
  for i in range(10):
    print("x =",i,"f(x) =",f(i))
    
def g(x):
  return(-3*x-8)
  
def sg():
  x=-3
  print("x =",x)
  while(g(x)>0):
    print("x =",x,"g(x) =",g(x))
    x=x+0.1
  return(x)