Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Testing A-6
Old
cdeleon
Junior Member
 
Status: Offline
Posts: 13
Join Date: Jul 2017
Location: Dallas
Angry Testing A-6 - 07-30-2017, 02:04 PM

Looking to finish Assignment 6. Currently in the works. I think mostly everyone is done with this assignment. However, this is what I have so far. Ok I tried uploading the file as a regular a2w, and as a zip. Both uploads failed. Any advice? @chickentree

Last edited by cdeleon; 07-30-2017 at 02:07 PM.
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 07-30-2017, 06:26 PM

Quote:
Originally Posted by cdeleon View Post
Looking to finish Assignment 6. Currently in the works. I think mostly everyone is done with this assignment. However, this is what I have so far. Ok I tried uploading the file as a regular a2w, and as a zip. Both uploads failed. Any advice? @chickentree
I have attached the file you sent me not sure why it is not showing up.


Mark Henwood
mhenwood@ieee.org

Last edited by chickentree; 07-30-2017 at 07:20 PM. Reason: tried to attach file again
   
Reply With Quote
Old
cdeleon
Junior Member
 
Status: Offline
Posts: 13
Join Date: Jul 2017
Location: Dallas
Default 07-30-2017, 06:43 PM

I can't see anything in your previous post. ^ Three problems I haven't found a fix for yet. One, my character continues to say the previous numbers at the start of his new verses. Two, the numbers have a .0, added at the end of them. And three, the song keeps going into the negatives, past 0.
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 07-30-2017, 07:18 PM

Quote:
Originally Posted by cdeleon View Post
Looking to finish Assignment 6. Currently in the works. I think mostly everyone is done with this assignment. However, this is what I have so far. Ok I tried uploading the file as a regular a2w, and as a zip. Both uploads failed. Any advice? @chickentree
As to your problem:

You are using a while loop. The loop will continue until the condition changes to false. So if you had a boolean variable called keepGoing and it was initially set to true the loop
Code:
while keepGoing
    do stuff 
        .
     change endingCondition
        .
     if endingCondition then
        keepGoing = false
Would keep going untill the ending condition became false. The ending condition could be anything you make it. in this case you might do something that reduces the value of start and then test to see if it is 2.
What you have right now is
Code:
while true
This will continue to repeat until true becomes false, which is never. It is what is called an endless loop and is almost always a bad idea.
Note that in your program you could just put the ending condition in the while statement, like
Code:
while start >2
This would work fine. The first example was to give you a better understanding of what was happening and how 'while' works in general.

All that being said, the 'for' loop would be a better choice. In general, if you know the number of times something is going to happen ahead of time choose the 'for' loop. If you drag the loop statement into 'my first method' you will see it has a 'show complex version' button. clicking this will show you the values the loop is using. Especially note the 'index'
variable. The index is what changes each time the loop is run
A test loop would look like this:
Code:
loop index from 0 up to but not including 100 times incrementing by 1
    print index
This will print out the value of index in a box below the movie screen.
To see this you will need to right click on the while block and disable it.
Ask yourself why?
Finally, the index values are counting up from 0 to 99 but you want the values to start at 100 and count down. I am leaving this as an exercise for you along with answering the question above. I will say the answer is very simple.

If you need more help let me know
Mark


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Old
cdeleon
Junior Member
 
Status: Offline
Posts: 13
Join Date: Jul 2017
Location: Dallas
Default 07-30-2017, 10:03 PM

Couldn't figure out the last two issues. I decided to turn it in and take the L on this one. Spent too much time on this assignment. More than I thought. Definitely behind in my other assignments. Will have to move quickly on the last 3 to get ahead. Thanks for trying though, @chickentree.
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.