Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   The Lounge (http://www.alice.org/community/forumdisplay.php?f=4)
-   -   Lab2 (http://www.alice.org/community/showthread.php?t=11538)

jumi 07-26-2016 01:41 PM

Lab2
 
It took me while to figure out the while loop. It was similar to other programming program, but user had to think a lot to make it smooth. I could not find the way to put "yes" "Yes" "YES" to be a user input and make the loop learn. I used a join with b function but it did not work. Is there any other way to do or different yes to make while loop work?

RavenOfCode 07-26-2016 09:46 PM

1 Attachment(s)
From what it sounds like you need to nest the loops inside each other.

EDIT:
Added a picture with nested loops, the only problem is after I complete the third loop I can't find a way to break out of it. Maybe I've just forgotten but is there a break statement in Alice? Or do I just need to make a workaround break statement?

chickentree 07-27-2016 10:10 AM

[QUOTE=jumi;57244]It took me while to figure out the while loop. It was similar to other programming program, but user had to think a lot to make it smooth. I could not find the way to put "yes" "Yes" "YES" to be a user input and make the loop learn. I used a join with b function but it did not work. Is there any other way to do or different yes to make while loop work?[/QUOTE]

Hi Jumi,
In order to help you I would need to know what the goal is (most of us are not part of any class and don't know what your assignment is.) Also if you could attach an example program it would help a lot to see what you've done so far.

Mark


All times are GMT -5. The time now is 01:00 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.