Welcome to another CODE100 puzzle. The challenge is to take this JSON dataset:
{
"cols": 30,
"sine": [
"-0.93", "-0.60", "-0.33", "-0.13", "0.00",
"0.00", "-0.13", "-0.33", "-0.60", "-0.93"
],
"parts": ["π»", "π"]
}
And turn into this construct:
π» π
π» π
π» π
π» π
π» π
π» π
π» π
π» π
π» π
π» π
π π»
π π»
π π»
π π»
π π»
π π»
π π»
π π»
π π»
π π»
Some hints:
- The
cols
property is the overall amount of chars on each line and the DNA sequence should be centered in it. - At its peak, this wave has 15 characters between the different emoji
My solution in c++
https://github.com/shg228/Developer-DNA/blob/main/main.cpp
Also you can run it online here
https://www.online-ide.com/UXlpFgfkvm