Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Thread Tools Display Modes
Lab 2
Status: Offline
Posts: 17
Join Date: Jul 2015
Talking Lab 2 - 07-27-2015, 10:11 PM

I just completed a lab where I had to create a character that would ask you for a random number and then he would jump up and spin that many times in the air. We were supposed to use loops but I accidently found a way to accomplish the same thing without using a loop. Basically I created a pop-up that asks the user to click either 'Yes' or 'No'. If 'Yes' the program will start over, if 'No' it will end.

Hope I get credit for being innovative!
Reply With Quote
Junior Member
Status: Offline
Posts: 6
Join Date: Jan 2016
Default 02-26-2016, 03:58 PM

I ended up doing the same thing because I kept getting stuck in infinite loops when trying to get the user to enter yes, YES, or Yes. I spent too many hours trying to figure this out I finally gave up.
Reply With Quote
Senior Member
RavenOfCode's Avatar
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Default 02-27-2016, 07:28 AM

You can just use a while loop with the condition to continue be set to yes.

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

My best Alice game:

Clash of the Cubes (an arena fighting game):
Reply With Quote
Junior Member
Status: Offline
Posts: 13
Join Date: Jan 2016
Question Lab2 - 03-10-2016, 04:45 PM

Mann! This one was kind of difficult, well at least it was to me. I got the jump and spin part down without a problem even though I am sure it could've been done smoother. When it came to the looping the jump and spin method on the answer of yes, Yes, or YES was like . I couldn't ask the user the proper question and the jump/spin method would loop no matter what the user type for their answer. Finally with the help of my professor I was able to get the program to come together hopefully good enough for the extra credit.
Reply With Quote

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 ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.