The other day I was tasked with creating the weekly quiz for my family. I decided it would be good to do a section that would consist of 10 words that were spelled using symbols of the chemical elements. The questions would be presented as a list of element names, like this.
Barium Carbon Potassium Tungsten Argon Darmstadtium
This breaks down to the element symbols in the following way.
Barium = Ba Carbon = C Potassium = K Tungsten = W Argon = Ar Darmstadtium = Ds
Putting that all together we spell out a word.
After a bit of thinking about what words I could use I decided to write a program that would help me. The questions in the quiz did not go down very well, but I thought I would put the code that I used here.
The first thing I did was to set up an array of elements that I could use to compare parts of words with.