PDA

View Full Version : Help? I am, new to using ALICE 2.2-- Need assistance


grambo112233
11-01-2009, 07:27 PM
I am not familiar with ALICE program. I have a program I have to try and design.

DOes anyone know how to accomplish this, or have any tips that will assist me with accomplishing this??


Create a world that asks the user to enter a rank (a number between 1 and 12) for the Big 12 college basketball teams. A character of your choice (People) should then associate that rank to the name of a team, using the table below. The person should then say the rank and the team name. If the rank entered is not between 1 and 12, the person should say that the number entered was invalid. Either way, the method should ask the user if he or she wishes to enter another rank. If the user selects Yes, the above steps should repeat. Otherwise, the method should end.

Rank Rank Team Name
1 Kansas Jayhawks
2 Oklahoma Sooners
3 Missouri Tigers
4 Nebraska Cornhuskers
5 Texas Longhorns
6 Iowa State Cyclones
7 Texas A&M Aggies
8 Texas Tech Red Raiders
9 Oklahoma State Cowboys
10 Colorado Buffaloes
11 Kansas State Wildcats
12 Baylor Bears


I KNOW how to add the person and have the bubble say, please enter a rank from 1 to 12. But it is there that I get lost. I have tried making new variables, parameters, Events and Methods, and I cannot figure out how to get a billboard or a bubble to pop up and allow the user on the computer to input a number from 1 to ten, then have the person (people) say what team that number is associated with, and if they enter a number that is not 1 thru 12 it should say that the entry was invalid, and ask if they want to enter another rank?????

I am now getting the person (bob) to ask for the user to enter a rank, then I get the "enter a numbeer window" I enter 1 or 2 and I get the first two teams I listed, one after another. I am using the If/Else command to accomplish what I have so far.

Thanks for the assistance.

x2495iiii
11-01-2009, 08:17 PM
That's the only thing I didn't like about the Alice textbook: it really doesn't address user prompts.

What you need to do is use a function called "ask user for" which is located under the world's function tab. If you create a number variable, then have it set its value to "ask user for a number", you can have that variable be defined directly by the user.

grambo112233
11-01-2009, 08:30 PM
Dont I want the program to define say 2 equals oklohoma sooners and say 4 to equal such and such a team????

I have twelve teams and I need to have the program spit out 12 teams in relation to their number as I listed in the chart?? If they input a number that is not 1 thru 12 it should put up a box with text saying, invalid,

then Either way, the method should ask the user if he or she wishes to enter another rank. If the user selects Yes, the above steps should repeat. Otherwise, the method should end. ???

I am so lost with this it isnt funny. I am 8 years working on networks and routers, and about total of 6 months with programming, and that is with everything except Java or ALICE!!!! LOL... If you have a couple minutes can you detail what I need to do??? If so I appreciate it tremendously. I have been working at this for about 6 hours today, and I am ready to give up.

x2495iiii
11-01-2009, 09:06 PM
Yeah, I know. It'll probably look something like this (note, you'll also have to create a list of strings called teams which has the teams in order):

If [ask user for a yes or no: title = "Would you like to enter a rank?"]
Rank set value to [ask user for number: title = "Enter a rank number"]
Person say "Team " (joined with) [rank as a string] (joined with) " is " (joined with) [rank]th item from world.teams.
else
do nothing

By the way, [a] joined with [b] and [what] as a string are also functions you'll need which are located under the world tab.

grambo112233
11-02-2009, 03:11 PM
I can drag and drop a "ask user yes or no" tab from functions, into the IF/Else , However I CANNOT drag and drop the "ask user for a number" tab into the If/Else????? IS that because it is not supposed to take it??? I thought possibly that it was because of an error in the download. So, i deleted the Alice 2.2 and I am downloading ALice 2.0 for Vista, and I am going to try that version and see if it works????

Is this a common problem oris that not supposed to accept the "ask user for a number" command???

It will take the other two commands, as a drag and drop into the IF/Else

**Also when you say RANK, what do you mean by that??? I type Rank into the IF/Else command box?? Could you walk me through what you wrote prior, but put in it where i click the(create a) new parameter or (create a ) new function (create a ) new World.****, etc.... So that I can understand what different commands to pull from the bottom and from the function tab on left, etc....

I need to wait for the new copy of ALice to download, then I am going to unzip it and try - rewriting the program. I mean how hard is it to get this program to make a guy on the screen ask the user to enter a rank number 1 through 12 and have those twelve numbers return a team assigned to the number??? ANd if they enter anything other than the 1-12, they get a "the number you entered was invalid" "would you like to enter a new number?"

The only thing I can think of is that I got a bad copy of ALICE, as it would not let me drag and drop the "ask user for a number" into the IF/Else

Any way you could write what you previously wrote so I can understand it better? I dont want you to think I am dense, but I am totally new to ALICE, I have read almost half the textbook, however it only has so many examples???

Thanks for all your help
-G

grambo112233
11-02-2009, 04:03 PM
I added a copy of the file. Could you take a look at it and see where I am going wrong???

Instead of explaining it, as I am not understanding it that way???

Thank you I appreciate it...

x2495iiii
11-02-2009, 04:15 PM
Rank is the number variable you'd need (and I assumed you already had, sorry) to get this program done. Also, if you look at my code, I never called for the "ask user for a number" function to be dragged onto an if/else if argument, only that it be dragged onto the Rank variable's value.

First, create a new number variable called "Rank"
Then, create a list of strings called "Teams" which has the teams in order, 0-11

If [ask user for a yes or no: title = "Would you like to enter a rank?"]
then
Rank set value to [ask user for number: title = "Enter a rank number"]
if Rank < 1 or Rank > 12
then
Person say "Enter another number"
else
Rank set value to Rank - 1
Person say "Team " (joined with) [[Rank] as a string] (joined with) " is " (joined with) [rank]th item from Teams.
else
do nothing

grambo112233
11-02-2009, 04:40 PM
How do I create a list of strings??? I tried going to the "worlds" Function tab, and dragging "What- AS A STRING" over to the WORLD.MY FIRST METHOD???

The problem is, that I do not know where to put the code??? I have a box under world.myfirstmethod that says "do nothing" above it I have the Rank=1 that I just made. I started over witha new slate. I now have the new Variable that is called "rank" with an equal sign then a 1.

Now I am trying to drag, oneof the only two tiles that have anything to do with a string over to the "do nothing" area and it will not allow me too???

I think the problem here is that I am trying to figure out which one of the tiles I use from the bottom to write what you are telling me to. The only way I can seem to get anything on the "world.my first method" is by adding the if/else tile from the bottom of the screen. What do I use to create the string? How can I open up an editor area to write what you are telling me to???? That is why I used the if/else before. I understand how to get the characters to move and I can make a program to kick balls around the screen etc.... But this actual program is absolutley foreign to me??? I guess I am trying to figure out what tile to start with and then the next one to use, etc..

I have- do in order, do together, if/else, loop, while, for all in order, wait, print and #. This is what I have at the bottom to allow me to enter anything into the DO NOTHING AREA....

I probably seem fairly dense, but I get all the movement and a lot of the other area's because I have had examples in the book, but there is not one example of this type of program written in the INtroduction to ALICE text.

can you explain to me how to make the list of strings, and what to drag to the middle to put what you have written there???

sorry for the length of this explaination, I have been studying for 3 days straight and I am at my wits end...

TY for your help, I really do appreciate it..
-=G

x2495iiii
11-02-2009, 04:57 PM
You keep focusing on functions when you should be focusing on variables. A list of strings is a variable, so you'd create it the same way you'd create a variable. If you just looked around at the other options in the window that pops up when you click the "Create variable" button, you'd know this. Also, the creation of lists variables IS covered by the textbook, and has examples listed on how to do so.

I made a simple, step-by-step example to re-exaplain it. If you still can't understand it, ask your teacher to help you.

grambo112233
11-02-2009, 08:45 PM
I asked the teacher for help before contacting you, andd he said to read chapter 2 and I would be able to perform what is asked. I read it 2 times. In fact I have read almost the whole book, and I have now filtered through it to try and find samples and examples of what you sent me, I cannot even figure out where you got the tile that has "set value to" included in it or on it. So I got the guy on the screen to ask for a rank, andd then the enter a number box to come up. I am just going to hand that in, and move on to the other assignments. I have spent three days trying to get this to work. I am stuck in this ONLINE class, when I usually take oncampus classes, just for this reason. I AM not a programmer, at ALL... I work on networks as an Admin. I can write small Unix scripts, etc.. But that is basically it. The other programming classes I took on campus, and could ask the teacher. This guy wont even speak to me over the phone, and I am paying 1300 a class????

Anyway, thanks for your help, but I am absolutely lost on what you did.

x2495iiii
11-02-2009, 09:05 PM
Look, I'm really not sure what to do here. I've explained it three times, getting simpler each time, and you keep asking different questions each time saying you don't understand what I'm doing. The questions you're asking are those of someone who hasn't even looked at the textbook. You've got to understand how frustrating this is for me, as well as for you.


I cannot even figure out where you got the tile that has "set value to" included in it or on it.
The "set value to" tile is found by dragging the variable onto the scripting area (that is in the textbook, page 281, very top of the page, in picture form even).

Look, I'm sorry for seeming impatient, but it takes effort on your part as well as mine to get this problem solved.

If you have any other questions, I'll do my best to answer them and help you in any way I can, alright?

Eangarra
11-21-2009, 04:30 PM
Your post was most helpful sir. I was just curious how to get the program to ask the user if they want to enter a second number to continue the program in a loop by asking the user "would you like to enter a second rank?" and if they do not to terminate the program but if they do to loop back to the questions again. Thanks for your help.

Eangarra
11-26-2009, 12:36 AM
I figured it out, thanks again for all your help. Figured it out actually right after my last post, just forgot to respond to myself.

kelmo
01-10-2010, 12:02 AM
I am working on the same Alice program and entering the ranks. I have also read everything but for some reason I can't get the program. I'm stuck can someone please create the world so that I can follow the steps it would be a great help. Thanks

x2495iiii
01-10-2010, 02:24 AM
Unfortunately we can't create the world. There's a possibility people may copy it and claim it as their own for school credit, which would be plagiarism.

We can help to get you through it, though. How far along did you get on your own when you last tried to make the world? What specific part did you get stuck on?

kelmo
01-10-2010, 04:04 PM
I followed the directions that you advised the other user. I created the rank with all of the teams and numbers. But everytime I enter 1 it displays that the number is not valid. I have entered the following code (if either rank <1 or rank <12, or both.)

jediaction
01-11-2010, 08:53 AM
Well mabye you can try making again a list of strings and make when key is pressed or button is clicked do a different method. If thats what your looking for than great

But theteams can only go to 9

x2495iiii
01-11-2010, 11:53 PM
I think you looked at one of the past posters' attachments, jediaction, as kelmo hasn't attached anything yet.

Kelmo can you post what you have so far?

LostInAlice
01-23-2010, 09:58 PM
I'm working on this same assignment and having trouble in 2 places.
1) when my person says the name of the team for the rank requested, the name is actually the team next in the list. I know it has to do with the list beginning with 0 and I am asking the use to specify 1-12 but I don't know how to make 1=0.
2) If the user enters an invalid number I have the person saying this is invalid then asking if they want to enter another rank. If they say yes, I ask for the number but whenthe user enters a number the program stops rather than getting the rank.

I know I'm close... Any suggestions?

LostInAlice
01-23-2010, 10:10 PM
I got part 1 to work, now I just need to figure out how to get the person say method to run after the invalid number and entering a new number.

zonedabone
01-27-2010, 04:22 PM
Out of the way!

Let zonedabone zone this one out!

Instructions are self explanatory.

If you need to add a person, just have the event triggered by clicking on him.

This world also has the only know way of removing decimals - randomizing!

x2495iiii
01-27-2010, 08:56 PM
Looks good, but the rounding methods don't work.

Also, I typically don't like it when people post examples of assignments from the textbook, but this one was really, really irritating to pretty much everyone who's tried to ask about it or help with it, so I don't mind if it stays up, but I would like it if you could put your name in it in a few creative places, just to make it harder to plagiarize.

zonedabone
01-27-2010, 09:24 PM
Oh! Sorry! I'll take it down right away!

graficdes9er
03-01-2010, 10:03 PM
Ok my problem is along the same lines with thte Big 12.. I have the variables set up, and I have the strings - (teams) set up as well. How do I get it to loop the other 11 times - when it asks if you want it to enter a number again, how do I make it so if they click no it ends, and does not continue to ask 11 more times?

WolfHawk
03-29-2010, 05:22 PM
I got part 1 to work, now I just need to figure out how to get the person say method to run after the invalid number and entering a new number.

I'm stuck here too. I can't get the program to ask for another number when they enter an out of range number nor can I get it to ask if they want to know another rank after going through once. The only way I can see to do it is to have an actual THEN statement as in IF/THEN/ELSE. Nesting IF/ELSE statements doesn't appear to do the same thing.

This thread DID help me get through a huge chunk of the problem and for that I am thankful. But I think I'm just going to have to take the bad grade because I've been at this for a week now. The only "textbook" we got is An Introduction to Programming Using Alice" which doesn't have a lot of user input instruction. (We didn't even get the accompanying cd!)

OmegaBunny
04-04-2010, 10:46 PM
Now for another question. How do I get it to loop to where it contiues to allow a user to ask questions continually until they choose no?

scottb305
05-10-2010, 01:47 PM
You keep focusing on functions when you should be focusing on variables. A list of strings is a variable, so you'd create it the same way you'd create a variable. If you just looked around at the other options in the window that pops up when you click the "Create variable" button, you'd know this. Also, the creation of lists variables IS covered by the textbook, and has examples listed on how to do so.

I made a simple, step-by-step example to re-exaplain it. If you still can't understand it, ask your teacher to help you.


How Do I open Simple Sample? all I get is code.

thanks

darkmoose84
06-21-2010, 03:14 PM
I've got a problem too of getting the person to say "item 'variable' from 'variable'". All he'll say are strings that I can type in, but I don't know where the function is that you had in the simple sample.

I've gotten everything else to work right with it except that, the most important part of it.

masterartisan
06-26-2010, 10:18 PM
How is this phrase constructed in alice?

Person say "Team " (joined with) [[Rank] as a string] (joined with) " is " (joined with) [rank]th item from Teams.

I am working on getting a person to say "X" from an string. X is determined by user input.
One example, in alice, says, person says item X from string.

I know I am missing something here. Anyone with a club?

Thanks,

masterartisan
06-29-2010, 02:34 AM
You keep focusing on functions when you should be focusing on variables. A list of strings is a variable, so you'd create it the same way you'd create a variable. If you just looked around at the other options in the window that pops up when you click the "Create variable" button, you'd know this. Also, the creation of lists variables IS covered by the textbook, and has examples listed on how to do so.

I made a simple, step-by-step example to re-exaplain it. If you still can't understand it, ask your teacher to help you.

IN the simpleexample where does "ground say item varible from string" come from? I don't see a way to make that happen.

Thanks,

x2495iiii
06-29-2010, 03:05 AM
IN the simpleexample where does "ground say item varible from string" come from? I don't see a way to make that happen.

Thanks,

Comes from making a simple Say method (found under any object's methods), then making a list of strings and a number variable, then dragging the list of strings to the text part of the Say method, which causes a popup menu to appear, one of whose options is "item <x> from strings" or something similar, which lets you use the number variable as the index which chooses the string the object says.

masterartisan
06-29-2010, 03:14 AM
I am looking for an eloquent solution to my issue. When the person announces the team, based off the rank. In an example the phrase went like, person says item A from B say as string. This seems perfect, however, I have no idea how to get it to say this. Any help is appreciated.

Thanks,

kobusaf
07-26-2010, 01:46 PM
Comes from making a simple Say method (found under any object's methods), then making a list of strings and a number variable, then dragging the list of strings to the text part of the Say method, which causes a popup menu to appear, one of whose options is "item <x> from strings" or something similar, which lets you use the number variable as the index which chooses the string the object says.

I did this and it worked once, but now it just returns a 'must not be null' message.

kobusaf
07-26-2010, 01:56 PM
I did this and it worked once, but now it just returns a 'must not be null' message.

Nevermind. I'm an idiot. During trial and error at the beginning I only entered 3 strings in my strings variable so anytime I picked a number above 3 the index value of say was null... or something along those lines.

Pesky Rabbit
07-29-2010, 11:09 PM
I'm just getting started myself. But this is what I would do.

Create a variable (Colleges): Set the value to 0
1.Pull the variable (Colleges) down in the method.
2.Click on world in the upper left box.
3.Then click on functions. Go down to ask user for a number.
4.Type in the question you want him to ask the user.
5. Then start creating your if/else statements.

Ex:

If Colleges ==1
Object say "You mean, the Kansas Jay hawks?"

Else
(Place another if statement below else)
If Colleges == 2
Object say "You mean Texas Longhorns?"
Else
(Place another if statement below else)...

And on the last Else statement write:

Else
Object say "You've entered an incorrect number."



And I would just keep building it like that. Now, don't get me wrong. I'm just starting out myself. So I don't know if there is a way to create a database to pull from. But if I had an assignment due and I just needed to get it done for now, that's how I would go about it.

The only problem I have, only because I haven't gotten there yet, is on that last Else statement that says, You're wrong, try again. I know how to get it to ask another question, but I'm not sure once you answered it if it would go through the if/else statement again, or just end.

Hope that helps.

OwningDTW
08-02-2010, 03:06 PM
Rank is the number variable you'd need (and I assumed you already had, sorry) to get this program done. Also, if you look at my code, I never called for the "ask user for a number" function to be dragged onto an if/else if argument, only that it be dragged onto the Rank variable's value.

First, create a new number variable called "Rank"
Then, create a list of strings called "Teams" which has the teams in order, 0-11

If [ask user for a yes or no: title = "Would you like to enter a rank?"]
then
Rank set value to [ask user for number: title = "Enter a rank number"]
if Rank < 1 or Rank > 12
then
Person say "Enter another number"
else
Rank set value to Rank - 1
Person say "Team " (joined with) [[Rank] as a string] (joined with) " is " (joined with) [rank]th item from Teams.
else
do nothing

Awesome. I would not have been able to do this without this post. You rule.

drgill1962
08-19-2010, 10:09 PM
I have the program almost finished, but I can't figure out how to input the "From Teams". Where is the "from" function? Thanks

x2495iiii
08-19-2010, 11:57 PM
There isn't one. You have to make a method that sets the value of the text string to anything. Then, drag the tile for the string list to the value the string is set to in the method and a popup menu should appear, with options including "ith item from Teams" (ith meaning you use a number or number variable to define which item it uses from the list).

iloveboarding
01-10-2011, 02:05 PM
Hello,
I am honestly feeling like a huge failure with this Alice program. I ordered the text book, it never came. I'm working off to the eTextbook, and well I haven't found it all that helpful... For some things of course, but not for a good portion of things.

I've read over the examples and done them so many times that I'm just frustrated that I feel that I still have things that I don't understand. This is my last resort to ask people on the forum for assistance.

im doing the big 12 ranking, and I'm still floundering in, but, I'm wanting to do this on my own as much as possible. However, it would be great if I could see examples that people post so that I can put directions/tips/tricks to a visual. I am unable to download any attachments, page comes up stating that the files are not found. I've tried right clicking and doing an open, I've tried to do a download, and i've resorted to installing the pc health check, and it's supposed to help with a2w files...

I'll see how that goes as I' ve just installed it and paid for the registration... Please let me know if there is something else I should have tried... I also asked my instructor about this, but no response as of yet. Also, i was referred to YouTube by my instructor to assist me with my questions, and honestly did not find it helpful.

Thank you so very much.

wadesaccount
01-10-2011, 08:11 PM
It's probably a really simple thing, but I can't find out how.
Nevermind: I found it. lol.

iloveboarding
01-11-2011, 03:51 AM
Hello,

I was finally able to open-up the file submitted regarding the ground world example for the Big12 questions. I'm wondering, where did you find the item and from statement which is the last command in that example? I have been unable to locate it, so was curious if you could let me know... I wanted to play around and see if I could get it to work.

Thanks,
Iloveboarding

Southern Belle
03-27-2011, 10:00 PM
Rank is the number variable you'd need (and I assumed you already had, sorry) to get this program done. Also, if you look at my code, I never called for the "ask user for a number" function to be dragged onto an if/else if argument, only that it be dragged onto the Rank variable's value.

First, create a new number variable called "Rank"
Then, create a list of strings called "Teams" which has the teams in order, 0-11

If [ask user for a yes or no: title = "Would you like to enter a rank?"]
then
Rank set value to [ask user for number: title = "Enter a rank number"]
if Rank < 1 or Rank > 12
then
Person say "Enter another number"
else
Rank set value to Rank - 1
Person say "Team " (joined with) [[Rank] as a string] (joined with) " is " (joined with) [rank]th item from Teams.
else
do nothing

----------------------------------------------

when you say create a list of strings is that from the menu of creating a new variable and select create list? I'm just not getting the process.

would appreciate any and all help you can provide, thanks!

southern belle