Computer Science Canada Help With Millionaire Like Game |
Author: | powerful08 [ Thu Jan 13, 2011 5:51 pm ] | ||
Post subject: | Help With Millionaire Like Game | ||
What is it you are trying to achieve? I"M Trying to make a Trivia Game Like Who wants to be a millionaire What is the problem you are having? Is there anyway to put in a code that lets the person playing the game to have the option to remove two of the answers like a Fifty-Fifty and to Call a Friend but no ask the audience without using the Procedure function for anything Describe what you have tried to solve this problem i though of it but i cant do it Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
thnks Please specify what version of Turing you are using Turing 4.1.1 |
Author: | Tony [ Thu Jan 13, 2011 6:18 pm ] |
Post subject: | Re: Help With Millionaire Like Game |
powerful08 @ Thu Jan 13, 2011 5:51 pm wrote: ...without using the Procedure function for anything
Well functions just make things simpler by allowing you to reuse a piece of code. If, for whatever bizarre reason, you wish to avoid those -- you could just write out the same piece of code every time. Kind of how you have the same piece of (logical) code for every question already. |
Author: | powerful08 [ Thu Jan 13, 2011 6:29 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
but can you help me write that code because im having problems writing the code for the fifty-fifty, ask the audience and the take the money home feature because we can not use procedure functions can you help me write the code for those features thanks |
Author: | Tony [ Thu Jan 13, 2011 6:36 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
What kind of problems are you having with writing that code? |
Author: | powerful08 [ Thu Jan 13, 2011 9:37 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
i dont know i dont know how to write a code like that can you do that for me tony if you can thanks |
Author: | powerful08 [ Thu Jan 13, 2011 9:39 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
can you change my code so those thing can occur without the use of the procedure function |
Author: | Tony [ Thu Jan 13, 2011 9:44 pm ] |
Post subject: | Re: RE:Help With Millionaire Like Game |
powerful08 @ Thu Jan 13, 2011 9:39 pm wrote: can you change my code so those thing can occur without the use of the procedure function
Is your teacher cool with giving me the marks for those parts? I could use some bonus marks... |
Author: | powerful08 [ Thu Jan 13, 2011 9:57 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
so ur not going to help me |
Author: | Tony [ Thu Jan 13, 2011 9:59 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
I didn't say that. |
Author: | powerful08 [ Thu Jan 13, 2011 10:01 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
yes my teacher is cool with u getting the marks ![]() |
Author: | Tony [ Thu Jan 13, 2011 10:12 pm ] |
Post subject: | Re: Help With Millionaire Like Game |
ಠ_ಠ Come on, "i dont know how to write a code like that" is a terrible excuse. If you knew how to do everything already, there wouldn't be a point in going to classes and doing assignments. |
Author: | powerful08 [ Thu Jan 13, 2011 10:31 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
can you give me a tip or something |
Author: | powerful08 [ Thu Jan 13, 2011 10:33 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
and i have tried its just that i cant get it right |
Author: | Tony [ Thu Jan 13, 2011 10:38 pm ] | ||
Post subject: | RE:Help With Millionaire Like Game | ||
Well your first step would be to figure out if the input is an attempt at an answer or the player is using one of the lifelines. |
Author: | powerful08 [ Thu Jan 13, 2011 10:40 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
so i check if its either a life line or a answer by putting in if answer1= 50-50 then |
Author: | Tony [ Thu Jan 13, 2011 10:50 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
hint: 50-50 will evaluate to 0. But yes. You already got the answer part covered. If the user does 50-50, then you'd want to display a new question and ask for the answer again. |
Author: | powerful08 [ Fri Jan 14, 2011 2:11 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
Thank you tony i got it now i have to use the same coding but with different questions can you now help me with the take the money feature and the phone a friend feature |
Author: | powerful08 [ Fri Jan 14, 2011 2:22 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
but how do i stop the player from using the 50-50 more then once |
Author: | Tony [ Fri Jan 14, 2011 3:10 pm ] |
Post subject: | RE:Help With Millionaire Like Game |
The other features are very similar to 50-50, so you can use your own code for reference. You might also want to keep track (perhaps in some variable) if a particular feature has been previously used or not. |