0
Code Coach "Kaleidoscopes"
Help! I tried all my ideas but I don't know what are test #4 and #5 and can't solve it. https://www.sololearn.com/coach/44?ref=app
9 Antworten
+ 5
The question (link) I mentioned in both threads is removed now , but still you can get a clue :)
From answers in these :
https://www.sololearn.com/Discuss/2135726/?ref=app
https://www.sololearn.com/Discuss/2127606/?ref=app
+ 2
I can't view the question of Koleidoscope because I don't have the PRO subscription.
Also, leaking PRO question / solution code is against Community Guideline.
As a general hint:
Edge case occurs at an extreme (maximum or minimum) operating parameter.
Corner case occurs outside of normal operating parameters.
Boundary case occurs when one of inputs is at or just beyond maximum or minimum limits.
From your code snippet, you are handling two cases
x > 1
and
x <= 1
For edge case, why 1 belongs to < not >? Try x >= 1 and x < 1
For boundary case, try x < 0 or x = 0
The rounding AwayFromZero, may works differently when x is negative.
When x is positive, away from zero is rounding up; When x is negative, away from zero is rounding DOWN. Why should it be round down? Try rounding up for negative.
Above are some ideas as to what changes can be made to test, not the actual solution, because, again, I emphasize that I don't know the question (and you shouldn't tell me).
+ 2
Have your problem been solved?
+ 2
Oh I am sorry that I am not of help.
+ 2
Thanks Daljeet Singh - it helped.
+ 1
Edge case
Test your program with input which are at the edge of the boundary
0
#5 works now. What can be tested more? 0,1,3,100, -4?
0
This works for 4/5 tests. I don't have any idea what to test more.
0
Thank U Gordon. Unfortunately no. It's took me 3 night to think about it - to much and make me insane. Logic is ok, I think that something with output display is wrong. At this momemt I move forward with anather Code Coach tasks. I will back to this task with fresh in future.