 |
|
|
|
|
 |
|
|
Guest
|
Help? I am, new to using ALICE 2.2-- Need assistance -
11-01-2009, 06: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.
Last edited by grambo112233; 11-01-2009 at 07:09 PM.
Reason: Try to reduce size
|
|
|
|
|
Super Moderator
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
|

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.
|
|
|
|
|
Guest
|
do I really want the user to define it? -
11-01-2009, 07: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.
|
|
|
|
|
Super Moderator
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
|

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.
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.
|
|
|
|
|
Guest
|
I tried what you wrote however.... -
11-02-2009, 02: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
|
|
|
|
|
Guest
|
Could you take a look at the file??? -
11-02-2009, 03: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...
|
|
|
|
|
Super Moderator
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
|

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?"]
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
|
|
|
|
|
Guest
|
Here's what I would try... -
07-29-2010, 10: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.
|
|
|
|
|
Guest
|
Unable to view attachments. -
01-10-2011, 01: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.
|
|
|
|
|
Guest
|
How do I start a thread? -
01-10-2011, 07:11 PM
It's probably a really simple thing, but I can't find out how.
Nevermind: I found it. lol.
Last edited by wadesaccount; 01-10-2011 at 07:38 PM.
Reason: I failed.
|
|
|
Thread Tools |
|
Display Modes |
Hybrid 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
HTML code is Off
|
|
|
Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.
|
 |