4 ms·
I don't think you determine a passing result correctly. I made several attempts as "Lesson 8: Take a While", all fulfilling the brief, and all telling me "Oops
by frobozz 15y ago
I don't think you determine a passing result correctly.
I made several attempts as "Lesson 8: Take a While", all fulfilling the brief, and all telling me "Oops, try again".
I wasn't even being particularly perverse on all of them. In fact, when I did try being perverse, I got it to pass even though it technically should have failed.
This is an example of perversely passing:
var times = 0;
while (true) {
print( "hello" );
if(times >=100) {
times = 2;
break;
}
times += 1
};
The brief is "Your turn! Let's make a while loop that prints "hello" twice. It's outlined in the editor."