Code Coach "Kaleidoscopes" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

6th Apr 2020, 8:46 AM
Grzegorz Dryja
Grzegorz Dryja - avatar
9 Answers
+ 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
12th Apr 2020, 12:41 PM
Daljeet Singh
Daljeet Singh - avatar
+ 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).
6th Apr 2020, 2:27 PM
Gordon
Gordon - avatar
+ 2
Have your problem been solved?
7th Apr 2020, 11:43 AM
Gordon
Gordon - avatar
+ 2
Oh I am sorry that I am not of help.
9th Apr 2020, 1:47 PM
Gordon
Gordon - avatar
+ 2
Thanks Daljeet Singh - it helped.
15th Apr 2020, 8:59 AM
Grzegorz Dryja
Grzegorz Dryja - avatar
+ 1
Edge case Test your program with input which are at the edge of the boundary
6th Apr 2020, 8:52 AM
Gordon
Gordon - avatar
0
#5 works now. What can be tested more? 0,1,3,100, -4?
6th Apr 2020, 1:25 PM
Grzegorz Dryja
Grzegorz Dryja - avatar
0
This works for 4/5 tests. I don't have any idea what to test more.
6th Apr 2020, 1:38 PM
Grzegorz Dryja
Grzegorz Dryja - avatar
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.
9th Apr 2020, 10:05 AM
Grzegorz Dryja
Grzegorz Dryja - avatar