A voir également:
- AIDE Python class Polynome
- Citizen code python - Guide
- Python retour à la ligne dans le code - Forum Python
- Geometry dash python ✓ - Forum Python
- Lancer script python linux - Forum Ubuntu
- Ce programme est écrit en python ✓ - Forum Python
1 réponse
Pour l'instant pour def __add__(self,other)
j'ai trouver ça, mais il me mettent faux:
p=len(self.coefs); q=len(other.coefs)
if p < q :
return Polynome (*([self.coefs[k] + other.coefs[k] for k in range(p)] + other.coefs[p:q]))
else :
return Polynome (*([self.coefs[k] + other.coefs[k] for k in range(q)] + self.coefs[q:p]))
j'ai trouver ça, mais il me mettent faux:
p=len(self.coefs); q=len(other.coefs)
if p < q :
return Polynome (*([self.coefs[k] + other.coefs[k] for k in range(p)] + other.coefs[p:q]))
else :
return Polynome (*([self.coefs[k] + other.coefs[k] for k in range(q)] + self.coefs[q:p]))