# purpose: calculate the mass, molar mass and mols of a molecule when given an equation and another molecule. I might try do this with tkinter so I can ue it for the Level 3 GUI project.

# planning

# dictionary of all elements and their relative molecular mass
ptable = {
 "H": {"AN": 1, "MM": 1},
 "He": {"AN": 2, "MM", 4},
 "Li": {"AN": 3, "MM": 6.9},
 "Be": {"AN": 4, "MM": 6.9},
 "B": {"AN": 5, "MM": 10.8},
 "C": {"AN": 6, "MM", 12},
 "N": {"AN": 7, "MM": 14},
 "O": {"AN": 8, "MM": 16},
 "F": {"AN": 9, "MM": 19},
 "Ne": {"AN": 10, "MM": 20.2},
 "Na": {"AN": 11, "MM": 23},
 "Mg": {"AN": 12, "MM": 24.3},
 "Al": {"AN": 13, "MM": 27},
 "Si": {"AN": 14, "MM": 28.1},
 "P": {"AN": 15, "MM": 31},
 "S": {"AN": 16, "MM": 32.1},
 "Cl": {"AN": 17, "MM": 35.5},
 "Ar": {"AN": 18, "MM": 40},
 "K": {"AN": 19, "MM": 39.1},
 "Ca": {"AN": 20, "MM": 40.1},
 "Sc": {"AN": 21, "MM": 45},
 "Ti": {"AN": 22, "MM": 47.9},
 "V": {"AN": 23, "MM": 50.9},
 "Cr": {"AN": 24, "MM": 52},
 "Mn": {"AN": 25, "MM": 54.9},
 "Fe": {"AN": 26, "MM": 55.9},
 "Co": {"AN": 27, "MM": 58.9},
 "Ni": {"AN": 28, "MM": 58.7},
 "Cu": {"AN": 29, "MM": 63.5},
 "Zn": {"AN": 30, "MM": 65.4},
 "Ga": {"AN": 31, "MM": 69.7},
 "Ge": {"AN": 32, "MM": 72.6},
 "As": {"AN": 33, "MM": }


 }

# ask user for balanced equation

    # develop way of checking if equation is balanced

# Ask for the mass of the first molecule

# calculate the molecular mass (M) of the molecule

# convert mass to mols (n = m / M)

# Ask for the second molecule (use function from first molecule?)

# find molar ratio of first to second molecule

# calculate mols of second molecule

# convert mols to mass (m = M * n)

# print(results)
