Valutare polinomio in Python

Valutare polinomio in Python

import numpy as np
def poli(x):
return (x-1)**9

val = poli(3)
print(val)

Risultato: 512


import numpy as np
def poli(x):
return (x-1)**9

def funzione_semplice(x):
return x

val = poli(3)
val2 = funzione_semplice(2)
print(val, " ", val2)

About Post Author

pasquale.clarizio

Leave Comments

errore: Content is protected !!
Advertisment ad adsense adlogger