 Bapesi yo ensemble ya ba éléments chimiques. Kokoma programme oyo e calculer somme ya ba MA nionso.
Tala programme oyo ekomami na Python oyo e calculer somme ya masse pona ba éléments chimiques oyo epesami: ```python à partir ya mendeleev import élément def somme_de_masses(éléments): total_mass = 0 pona e na ba éléments: total_mass += élément(e).atomic_weight return total_mass elements = ["H", "Ye", "Li", "Zala", "B", "C", "N", "O", "F", "Ne", "Na", " Mg", "Al", "Si", "P", "S", "Cl", "Ar"] result = somme_de_masses(éléments) print("Masse totale ya ba éléments epesami ezali:", résultat) ` `` Na programme oyo, tosalelaka module `mendeleev`, oyo ezali na ba informations ya ba éléments na tableau périodique. To définir fonction, `sum_of_masses`, oyo ezuaka liste ya ba éléments lokola argument. Na kati ya fonction, to iterer na nzela ya élément moko na moko pe tobakisi poids atomique na yango na variable, `total_mass`, na kosalelaka attribut `atomic_weight` ya objet `element` oyo ewutaka na module `mendeleev`. Na suka, fonction ezongisaka variable `total_mass`. Na sima to bengi fonction oyo na liste ya entrée ya ba éléments pe to imprimer résultat, oyo epesi biso somme ya masse pona ba éléments oyo epesami.