Homework of week >07 (Submission deadline: 23:59, Oct. 21, 2025)
  1. Write a shell script to calculate the molecular weight of the input chemical formula from $1.
    Your script must be stand-alone, that is, independent of any database file such as ~jsyu/atom.3.

    Example input strings: C6H12O6 , C1H3Br1, CH3Br, C2H5O1H1 , C2H4BrOCl ......
    Notes: Pay attention to the logic to distinguish between H and He; B and Br; C and S and Cs and Sc, ....etc.


  2. Bonus question:
    1. Re-write your homework 1 of the previous week using numeric and/or associative array.
    2. Use python or C language to call the regurlar expression library to calculate the molecular weight of the input chemical formula.
    These are optional.



References that might be useful: