Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Loops and While statements
Old
Alex Rodriguez
Guest
 
Status:
Posts: n/a
Default Loops and While statements - 03-06-2009, 03:24 PM

I made a scene where it askes the user to input how many times my object (which is the hare) will spin. On top of that, I had him jump simultaneuously while the hare spins in the air. Then after that runs through, it asks the user if he/she wants to try again. I used a loops on my spin method, and used a variable to determine how many times he spins in the air. I used a while statement to repeat the entire scene if the user inputs yes. ONe mistake I was making was not making a variable for a string, instead I was using it as a number. There was also an extra bonus to the assignment to make the user able to input yes, or YES, or Yes. I was not sure how to make my variable accept multiple inputs.
   
Reply With Quote
Hey bud
Old
bsmill04
Guest
 
Status:
Posts: n/a
Default Hey bud - 03-08-2009, 05:33 PM

David from your class. Take a look at my post and it ought to give you more insight as to how to work that bonus portion of the lab. Also if you want i can email you a copy of my lab so that you can see what i did.

http://www.alice.org/community/showt...=9126#post9126

my post is above.
   
Reply With Quote
Reply


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.