Computer Science Canada Turing Score Problem! |
Author: | sp96 [ Sun Jun 19, 2011 11:18 am ] |
Post subject: | Turing Score Problem! |
Ok so i have to make a quiz for my programing class at school, and i made the quiz and it works but my counter for the score always shows the score as 0! % first easy question body win_start cls Pic.DrawSpecial (pic_id16, 0, 0, picCopy, picFadeIn, 500) %question Font.Draw ("What are the tree types of tennis court surfaces?", 200, 500, font_id, black) %possible answers rb1a (1) := GUI.CreateRadioButtonFull (100, 500, "Hard, Grass Clay", 0, radio_pressed, GUI.LEFT, '1') rb1a (2) := GUI.CreateRadioButtonFull (-1, -1, "Clay, Sand, Grass", rb1a (1), radio_pressed, GUI.LEFT, '2') rb1a (3) := GUI.CreateRadioButtonFull (-1, -1, "Gravel, Sand, Grass", rb1a (2), radio_pressed, GUI.LEFT, '3') rb1a (4) := GUI.CreateRadioButtonFull (-1, -1, "Gravel, Sand,Clay", rb1a (3), radio_pressed, GUI.LEFT, '4') rb1a (5) := GUI.CreateRadioButtonFull (-1, -1, "", rb1a (4), radio_pressed, GUI.LEFT, '5') GUI.SelectRadio (rb1a (5)) GUI.Hide (rb1a (5)) %continue button cont1a := GUI.CreateButtonFull (200, 200, 100, "Continue", cont1_esy, 0, "^C", true) end win_start body cont1_esy cls % points system that show user if answer was correct or not if GUI.GetEventWidgetID = rb1a (1) then counter := counter + 1 Pic.DrawSpecial (pic_id11, 200, 200, picCopy, picFadeIn, 500) elsif GUI.GetEventWidgetID = rb1a (2) then counter := counter + 0 Pic.DrawSpecial (pic_id12, 200, 200, picCopy, picFadeIn, 500) elsif GUI.GetEventWidgetID = rb1a (3) then counter := counter + 0 Pic.DrawSpecial (pic_id12, 200, 200, picCopy, picFadeIn, 500) elsif GUI.GetEventWidgetID = rb1a (4) then counter := counter + 0 Pic.DrawSpecial (pic_id12, 200, 200, picCopy, picFadeIn, 500) end if next1a := GUI.CreateButtonFull (300, 300, 100, "Next", next_easy1, 0, "^N", true) end cont1_esy |
Author: | sp96 [ Sun Jun 19, 2011 5:39 pm ] |
Post subject: | RE:Turing Score Problem! |
please help! |
Author: | goroyoshi [ Sun Jun 19, 2011 5:42 pm ] | ||
Post subject: | RE:Turing Score Problem! | ||
please use syntax tags [syntax="code here"] put "hello world" [/syntax] turing should output
|
Author: | Tony [ Sun Jun 19, 2011 5:58 pm ] |
Post subject: | RE:Turing Score Problem! |
Where in that code do you draw the score to the screen? Also, you should have answered the provided questions; namely -- what did you do to attempt to solve your problem? |
Author: | sp96 [ Sun Jun 19, 2011 5:59 pm ] | ||
Post subject: | Re: Turing Score Problem! | ||
Thank you for letting me know
So can anyone help me? |
Author: | sp96 [ Sun Jun 19, 2011 6:19 pm ] |
Post subject: | RE:Turing Score Problem! |
Please help! |
Author: | Zren [ Sun Jun 19, 2011 6:35 pm ] |
Post subject: | RE:Turing Score Problem! |
This line is pointless as the variable doesn't change. counter := counter + 0 counter := counter + 1 Can also be written as: counter += 1 That won't solve your problem though. As Tony said: Quote: Where in that code do you draw the score to the screen? What did you do to attempt to solve your problem? |
Author: | ProgrammingFun [ Sun Jun 19, 2011 6:36 pm ] |
Post subject: | Re: RE:Turing Score Problem! |
Tony @ Sun Jun 19, 2011 5:58 pm wrote: Where in that code do you draw the score to the screen?
Also, you should have answered the provided questions; namely -- what did you do to attempt to solve your problem? |
Author: | sp96 [ Sun Jun 19, 2011 6:42 pm ] |
Post subject: | RE:Turing Score Problem! |
I output the score ate the beginning of every question |
Author: | Zren [ Sun Jun 19, 2011 6:51 pm ] |
Post subject: | RE:Turing Score Problem! |
It'd help if we saw maybe the next few questions, as it's obviously not the first question that's the problem... |
Author: | sp96 [ Sun Jun 19, 2011 7:12 pm ] | ||
Post subject: | Re: Turing Score Problem! | ||
|
Author: | sp96 [ Sun Jun 19, 2011 7:15 pm ] |
Post subject: | RE:Turing Score Problem! |
theres a few more questions |
Author: | goroyoshi [ Sun Jun 19, 2011 8:06 pm ] |
Post subject: | RE:Turing Score Problem! |
then please show us the whole code for the questions |
Author: | ProgrammingFun [ Sun Jun 19, 2011 8:14 pm ] |
Post subject: | Re: RE:Turing Score Problem! |
goroyoshi @ Sun Jun 19, 2011 8:06 pm wrote: then please show us the whole code for the questions
...we aren't going to copy your code for anything (nor anyone else I would think). And if you want help from us, you will have to share it. Also, you do not need to double-post...and you still aren't answering: Tony wrote: Where in that code do you draw the score to the screen? Also, you should have answered the provided questions; namely -- what did you do to attempt to solve your problem? |
Author: | goroyoshi [ Sun Jun 19, 2011 8:17 pm ] |
Post subject: | Re: RE:Turing Score Problem! |
ProgrammingFun @ Sun Jun 19, 2011 8:14 pm wrote: Also, you do not need to double-post... there is a handy tool on the forums called edit, you can edit your posts with it |