Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Help getting loops (http://www.alice.org/community/showthread.php?t=11861)

bloredo 12-20-2017 11:06 PM

Help getting loops
 
I have an assignment where our character has to sing 99 bottles of pop on the wall. The number of bottles should decrease just like the song. I feel like I'm thinking too much about this but I'm stuck on just to get started. I thought the number of bottles could be my variable however I cant join a number variable inside a string. Any ideas?

jaylee72 12-21-2017 12:10 AM

use WHAT as a string
 
Hi Bri - I posted in our discussion group too. That info below but I forgot to mention, you can add a step to the method to use WHAT AS A STRING. Then you can plug your variable for number of bottles in the SAY.

From our class discussion: Hi Brianna! I set my variable for number of bottles as a number. Add it to the method, decrement by one. Use the 'while' loop til number of bottles is > 0

Hope that helps!


All times are GMT -5. The time now is 09:35 AM.

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