Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Help getting loops
Old
bloredo
Junior Member
 
Status: Offline
Posts: 10
Join Date: Dec 2017
Question Help getting loops - 12-20-2017, 10:06 PM

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?
   
Reply With Quote
use WHAT as a string
Old
jaylee72
Member
 
Status: Offline
Posts: 16
Join Date: Dec 2017
Default use WHAT as a string - 12-20-2017, 11:10 PM

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!
   
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.