Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Lab2
Old
jumi
Junior Member
 
Status: Offline
Posts: 5
Join Date: Jul 2016
Default Lab2 - 07-26-2016, 12:41 PM

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?
   
Reply With Quote
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Default 07-26-2016, 08:46 PM

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?
Attached Images
File Type: jpg LoppMethod.jpg (20.6 KB, 2 views)


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game

Last edited by RavenOfCode; 07-28-2016 at 08:15 AM.
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 07-27-2016, 09:10 AM

Quote:
Originally Posted by jumi View Post
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?
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


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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