Alice Community Spinning frog & dialog box

 Spinning frog & dialog box
rkfoote
Guest

Status:
Posts: n/a
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
 Lab2.a2w (4.99 MB, 30 views)

 amueller Guest   Status: Posts: n/a 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
 Ahsum!
 timsally Guest   Status: Posts: n/a 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.
 frog
 rkfoote Guest   Status: Posts: n/a 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

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge