Alice Community

Alice Community (
-   How do I...? (
-   -   Help? I am, new to using ALICE 2.2-- Need assistance (

grambo112233 11-01-2009 06:27 PM

Help? I am, new to using ALICE 2.2-- Need assistance
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 07: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 07:30 PM

do I really want the user to define it?
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 08: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.
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 02:11 PM

I tried what you wrote however....
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

grambo112233 11-02-2009 03:03 PM

Could you take a look at the file???
1 Attachment(s)
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 03: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?"]
Rank set value to [ask user for number: title = "Enter a rank number"]
if Rank < 1 or Rank > 12
Person say "Enter another number"
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.
do nothing

grambo112233 11-02-2009 03:40 PM

SORRY FOR LENGTH OF THIS, no examples in text for this????
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 " 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..

x2495iiii 11-02-2009 03:57 PM

1 Attachment(s)
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 07:45 PM

Thank you for your help...
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.

All times are GMT -5. The time now is 01:32 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.