Write a recursive function that determines whether or not a word can be spelled using only element symbols.


Each chemical element has a standard symbol that is one, two or three letters long. One game that some people like to play is to determine whether or not a word can be spelled using only element symbols. For example, silicon can be spelled using the symbols Si, Li, C, O and N. However, hydrogen cannot be spelled with any combination of element symbols.

Write a recursive function that determines whether or not a word can be spelled using only element symbols. Your function will require two parameters: the word that you are trying to spell and a list of the symbols that can be used. It will return a string containing the symbols used to achieve the spelling as its result, or an empty string if no spelling exists. Capitalization should be ignored when your function searches for a spelling.

Create a program that uses your function to find and display all of the element names that can be spelled using only element symbols. Display the names of the elements along with the sequences of symbols. For example, one line of your output will be:

Silver can be spelled as SiLvEr

Your program will use the elements data set, which can be downloaded from the author’s website. This data set includes the names and symbols of all 118 chemical elements.

find the cost of your paper

The post Write a recursive function that determines whether or not a word can be spelled using only element symbols. appeared first on Best Custom Essay Writing Services | EssayBureau.com.

[Button id=”1″]

Thanks for installing the Bottom of every post plugin by Corey Salzano. Contact me if you need custom WordPress plugins or website design.

Looking for a Similar Assignment? Our ENL Writers can help. Get your first order at 15% off!

Order

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp
%d bloggers like this: