Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEA
Hi Maveryx,
A solution to last week’s challenge can be found here.
Patrick Digan (@patrick_digan) submitted this challenge that will test your logic skills. Thank you, Patrick, for submitting this great challenge!
You have a dataset that looks like this:
Record |
A |
B |
C |
1 |
1.0 |
0.0 |
0.0 |
2 |
1.0 |
0.0 |
0.0 |
3 |
2.0 |
1.0 |
0.0 |
4 |
? |
? |
? |
Your task is to generate rows for records 4 through 25 (1 to 3 will stay the same), and calculate the values of A, B, and C for each row.
The general logic to determine the values in columns A, B, and C for records 4-25 is:
Hint: You will need to make sure that you calculate the values record by record.
Example for Record 4:
A=2+1+0=3
B=2-1=1
C=2-1-0=1
Example for Record 5:
A=3+1+1=5
B=3-1=2
C=3-1-1=1
Need a refresher? Review the following lessons in Academy to gear up.
Good luck!
My solution. I think there is an easier solution than mine. But my brain has no idea except this one.
IF [ABC]="::" THEN
ToString(
ToNumber(GetLeft([Row-1:ABC], ":"))+
ToNumber(GetPart([Row-1:ABC], ":",1))+
ToNumber(GetPart([Row-1:ABC], ":",2))
)+":"+
ToString(
ToNumber(GetLeft([Row-1:ABC], ":"))-
ToNumber(GetPart([Row-1:ABC], ":",1))
)+":"+
ToString(
ToNumber(GetLeft([Row-1:ABC], ":"))-
ToNumber(GetPart([Row-1:ABC], ":",1))-
ToNumber(GetPart([Row-1:ABC], ":",2))
)
ELSE [ABC]
I'm glad to see this problem made it to the weekly challenges! After you've solved it, here's something interesting:
Fibonacci rewritten ...