Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Questions and Comments (http://www.alice.org/community/forumdisplay.php?f=9)
-   -   Lab 2 (http://www.alice.org/community/showthread.php?t=11251)

shaolinkidd 07-27-2015 10:11 PM

Lab 2
 
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! :rolleyes:

RPage74 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.:confused:

RavenOfCode 02-27-2016 07:28 AM

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

btolor 03-10-2016 04:45 PM

Lab2
 
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 :eek:. 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.


All times are GMT -5. The time now is 04:12 PM.

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