Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Spinning frog & dialog box
Old
rkfoote
Guest
 
Status:
Posts: n/a
Default Spinning frog & dialog box - 12-26-2010, 12:54 PM

I just finished another assignment for DCCCD programming logic course. This one has a frog that asks the user for a number, then jumps up and spins around the number of times that the user entered. Then the frog asks the user if he/she wants to run the program again, and based on the answer, either starts all over again or stops.

Everything worked fine for me on this assignment. I used a loop in the main method to determine whether the program would restart or stop, and another loop to make the frog spin the required number of times. The only issue/problem was that when I close the world and reopen it, before I click on "Play", a dialog box pops up and asks me to enter yes or no...not sure why this is happening. Any ideas? I'll attach the file.
Attached Files
File Type: a2w Lab2.a2w (4.99 MB, 30 views)
   
Reply With Quote
Old
amueller
Guest
 
Status:
Posts: n/a
Default 12-27-2010, 10:14 AM

I just looked at it. World looks good and everything works fine. Good job!
I didn't think about the possibility of adding files to posts here. I'm gonna do that for assignment 7 which I just finished
   
Reply With Quote
Ahsum!
Old
timsally
Guest
 
Status:
Posts: n/a
Thumbs up Ahsum! - 12-28-2010, 10:04 PM

Rebecca,

I like that you posted your world because it showed a more compact way for me to solve that problem of "yes", "Yes", and "YES" as three equal responses. Where did you learn how to do that?

What I did seems amateurish now....

I created an IF/ELSE IF/ELSE IF equation where IF was "yes", the first ELSE IF was "Yes" and the second ELSE IF was "YES".

You did a great job!

Tim S.

Oh, the reason it's bringing that up is that it's going through the boolean operations for some reason....expecting you to enter a VALUE in order for it to show you the program. I don't know why it doesn't do the same for entering a number....but I think it only does it for variables that require a STRING. It happened in mine also.
   
Reply With Quote
frog
Old
rkfoote
Guest
 
Status:
Posts: n/a
Default frog - 01-01-2011, 12:28 PM

Hi Tim,

Weird that it wants that value entered before the program runs. I thought maybe it was just something with my particular install of Alice, but I guess not since you had the same issue.

I knew about "or" logic from some programming that I've already done, and then just trial and error in Alice.

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