Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Lab 2
Old
smileysand
Junior Member
 
Status: Offline
Posts: 14
Join Date: Jul 2015
Default Lab 2 - 07-27-2015, 10:55 PM

Oh my i have completed but could not figure out how to do the bonus. I tried creating a string list for the different yes. The problem with the string list when you put in a call method it will ask for the first or the last of the string list. This was quite challenging by far. Was anyone able to do the bonus. An how many statements did everyone have. Were they able to consolidate statements?
   
Reply With Quote
Lab 2
Old
shaolinkidd
Member
 
Status: Offline
Posts: 17
Join Date: Jul 2015
Talking Lab 2 - 07-27-2015, 11:14 PM

I was able to accomplish the same thing a different way. I created a pop-up box with the choices 'Yes' and 'No'. If you click 'Yes' loop continues, if 'No' it stops.

Just stumbled on this by exploring, I didn't even attempt the Yes, yes, YES method!
   
Reply With Quote
Old
Diary0926
Junior Member
 
Status: Offline
Posts: 11
Join Date: Jul 2015
Default 07-27-2015, 11:49 PM

Unfortunately I suffered the same fate. I believe that part is too advanced for me. I was able to complete everything else though.
Loops are becoming easier to use.
   
Reply With Quote
Old
Petit Suisse
Member
 
Status: Offline
Posts: 46
Join Date: Jul 2015
Default 07-28-2015, 04:27 AM

That's great. The bonus is a bonus for a reason I suppose, but in terms of the logic of how to do it, think of it this way...

You have already asked the user if they want to repeat the program, and if they input "yes" your while loop continues.

In the bonus you want to give them an option so they can input EITHER yes OR YES OR Yes.

In the same place you defined "while statement true", you can pick "logic". This will give you the option to add criteria, such as either yourVariable == yes or yourVariable == Yes or yourVariable == YES.

Have a play with the logic option and see how it goes. There might be other ways, but that way worked for me.

Good luck playing!
   
Reply With Quote
Reply

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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.