Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Help with if / else statement
Old
Schmausie
Guest
 
Status:
Posts: n/a
Default Help with if / else statement - 10-27-2010, 08:09 PM

I am hoping to find some answers here for my problem. I cannot figure out how to create this statement.
I have 3 people walking toward another person. Once that person is reached he asks how many tickets would you like to buy, they are $4 each. Here the user is asked for input. User inputs number up to 3 and the 4th person will state the amount and all 3 people will walk through gate. If user inputs anything over 3 people nothing happens, if user inputs number 1 or 2 the 4th person says, you need to purchase more tickets and asks again for tickets to be purchased.

I would appreciate any help I can get. This has been driving me crazy. I would like to say thank you for all your help in advance.
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 10-27-2010, 08:14 PM

Quote:
Originally Posted by x2495iiii, super moderator View Post
The policy of the boards is to only offer help with assignments when a good faith effort on the part of the student to attempt the work themselves has been shown.

So post a world with your best attempt at the assignment and we'll guide you from there.
Give it your best shot, post your world, and we'll help you from there.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
Schmausie
Guest
 
Status:
Posts: n/a
Default 10-27-2010, 08:26 PM

Thank you, thank you.
Attached Files
File Type: a2w enter.gate.a2w (7.77 MB, 8 views)
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 10-27-2010, 08:27 PM

Downloading, will post back in an edit...

K, got it. Ask me any questions you have.

Basically, I have it so that as long as the number of tickets doesn't equal 3, it will ask for the number of tickets you want again.
Attached Files
File Type: a2w enter.gate.a2w (7.79 MB, 10 views)


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.

Last edited by debussybunny563; 10-27-2010 at 08:47 PM. Reason: File attached
   
Reply With Quote
Old
Schmausie
Guest
 
Status:
Posts: n/a
Default 10-27-2010, 08:52 PM

Thank you for all your help. I will be reviewing the file and let you know of any questions.
   
Reply With Quote
Old
Schmausie
Guest
 
Status:
Posts: n/a
Default 10-27-2010, 09:18 PM

This helped me tremendously. Thank you - I have another question for you, this one involves a loop and a if /else statement. Do you think you could help me there as well? I have attached the file - if you can help me with this one as well I could get my actual file closer to the finish line.
Attached Files
File Type: a2w toss.a2w (369.7 KB, 9 views)

Last edited by Schmausie; 10-27-2010 at 09:28 PM. Reason: Added file
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 10-27-2010, 09:35 PM

Working on it...

EDIT: Could you be more specific on the instructions?

I also have some math homework to do, so I probably won't finish until tom. though; sorry.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.

Last edited by debussybunny563; 10-27-2010 at 09:47 PM.
   
Reply With Quote
Old
Schmausie
Guest
 
Status:
Posts: n/a
Default 10-28-2010, 06:30 AM

If you open the file I have some comments in place that should explain further. Let me know if it is not clear still.
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 10-28-2010, 09:32 PM

I need more information.

Could you post the complete directions directly from the textbook or wherever the directions came from?


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
Schmausie
Guest
 
Status:
Posts: n/a
Default 10-28-2010, 09:44 PM

They came from me. I made it up. I have a project that needs to do this for 3 people. I just do not know where to start. Basically, pick up ring and toss it at cone. First one should miss cone, then second ring is tossed and it hits the cone right therefore fitting the ring on the cone, the third ring also hits the cone right. Is this what you needed?
   
Reply With Quote
Reply

Tags
if/else statement, math

Thread Tools
Display Modes

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.