<commit_before><commit_msg>First draft of "Molecular mass calculator".<commit_after>{% extends "problems/problem.html" %}

{% block page_title %}
    {{ problem.name }} | Project Lovelace
{% endblock %}

{% block problem_name %}
    {{ problem.name }}
{% endblock %}

{% block required %}
    <p><b>Required math</b>: None.</p>
{% endblock %}

{% block problem_body %}
    <p>
        Molecules are made up of atoms and each atom has a specific mass. For example, water (H2O) is a molecule made up of two hydrogens and an oxygen. Atoms are so light (*insert*) that using grams to describe their mass can get pretty annoying so we use other units, like the atomic mass unit (amu), to do so. 1 amu is defined as one twelevth the mass of a carbon-12 atom, or 1.661e-27 kg. For example the lightest atom, the hydrogen (H) atom, has a mass of 1.008 amu while carbon (C) has a mass of 12.011 amu and the heaviest atom on the periodic table, Oganesson (Og), has a mass of 294 amu. Methane (CH4) has a mass of 16.04 amu.

        Your program should read in a comma-separated file containing the abbreviation of the elements in the periodic table with their masses in atomic mass units (amu) along with an arbitrary chemical formula and print its molecular mass.
    </p>
{% endblock %}

{% block input_description %}
    <p>
        * A file (element_masses.csv) containing the abbreviation of the elements in the periodic table with their masses in atomic mass units (amu).
        * The molecule's chemical formula.
    </p>
{% endblock %}

{% block input_example %}
    Pa
    OCS
    C4H4AsH
    C20H25N3O
{% endblock %}

{% block output_description %}
    <p>
        The molecule's mass in atomic mass units (amu).
    </p>
{% endblock %}

{% block output_example %}
    231.04 amu
    60.08 amu
    128.00 amu
    323.44 amu
{% endblock %}
{'fraction_non_alphanumeric': 0.09624796084828711, 'fraction_numerical': 0.028820010875475803, 'mean_word_length': 3.1913439635535306, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5526377', 'n_tokens_mistral': 628, 'n_tokens_neox': 540, 'n_words': 249}