Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Assignment 6
Old
Nita
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jan 2017
Default Assignment 6 - 03-23-2017, 05:44 PM

Hi,

So I am currently on assignment 6, which is to create an Alice program in which a character sings "99 Bottles of Pop". I'm supposed to use the least amount of lines possible. But I'm really having issues.

http://www.alice.org/community/showt...highlight=song

I followed the steps to the best of my ability on the page I linked, and I am still not getting it.

Help?
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 210
Join Date: Dec 2012
Location: Frosno, Ca
Default 03-24-2017, 12:05 PM

Quote:
Originally Posted by Nita View Post
Hi,

So I am currently on assignment 6, which is to create an Alice program in which a character sings "99 Bottles of Pop". I'm supposed to use the least amount of lines possible. But I'm really having issues.

http://www.alice.org/community/showt...highlight=song

I followed the steps to the best of my ability on the page I linked, and I am still not getting it.

Help?
Can you provide your movie so far, I need to see what you are trying to do in order to help.
In general you can use The "Loop" instruction changing the values to count from 99 down to 0. The index will then be the bottle count. Or you could create your own index value and using the "While" instruction count the index down to 0 testing its value each time through the while.
As far as the least amount of lines. Don't worry about it, get the basic problem working and then see how you can improve it.

Mark


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 500
Join Date: Sep 2007
Location: Austin, Texas
Default 03-25-2017, 02:35 PM

Yeah- Assuming the need for a Loop or While is needed, I could get it in four or five lines inside the loop using the standard four lines for the lyrics.
5) A While Loop that counts down is easier.
4) A Standard Loop is shorter, but requires more complicated commands.

Last edited by MrMoke; 03-25-2017 at 05:49 PM.
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.