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?
|
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 04:20 PM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.