Lago Musical is a technical test that allows you to input a given sound from the list of sounds each animal makes and returns the remaining sounds from any of the three songs the explorer wrote.
One day, an explorer began following some strange sounds, eventually reaching a lake where he found the source: three little animals making sounds similar to a song. After a short while, the explorer was able to distinguish which animal produced each sound.
Sounds Frog: brr, birip, brrah, croac Dragonfly: fiu, plop, pep Cricket: cric-cric, trri-trri, bri-bri
After some time, he discovered they were 'singing' together. Whenever the frog started with brr, the dragonfly responded by rubbing its tail against a branch, producing a sound like fiu. After the dragonfly, the cricket continued with cric-cric, but whenever the frog sounded like brrah or croac, all the animals fell silent for a while and then resumed. Before the sky darkened, the explorer managed to write down three 'songs' they all sang together, and these notes came to his mind.
Songs brr, fiu, cric-cric, brrah pep, birip, trri-trri, croac bri-bri, plop, cric-cric, brrah
EXERCISE Using the programming language you feel most comfortable with, write a program that allows you to input a given sound from the list of sounds each animal makes and returns the remaining sounds from any of the three songs the explorer wrote. For example:
When given brr, it should play fiu, cric-cric, brrah according to the first song. When given birip, it should play trri-trri, croac according to the second song. When given plop, it should play cric-cric, brrah according to the third song. When given croac or brrah, it shouldn't play anything according to all the songs."
JavaScript
- JavaScript
- JavaScript Challenge
N/A
To get a local copy up and running, follow these steps.
In order to run this project you need:
VsCode
Clone this repository to your desired folder:
cd my-folder
git clone git@github.com:oovillagran/lago_musical.git
Install this project with:
cd lago_musical
npm install
To run the project, execute the following command at terminal:
node lago_musical.js
N/A
You can deploy this project using:
N/A
👤 Author1
- GitHub: @oovillagran
- Twitter: @oovillagran
- LinkedIn: oovillagran
- Add an html interface
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project feel free to reach me.
N/A
N/A