Announcement

Collapse
No announcement yet.

Help with randomizing questions and answers in a quiz application

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: Help with randomizing questions and answers in a quiz application

    Tigg-
    LOL I wish I knew just a butt hair of what you have forgotten in this programming!
    Question, the test works great but I noticed the end score only shows 100%, no 90%, 80% etc. How would I implement that?
    Thx so much for your help!

    Comment


    • #17
      Re: Help with randomizing questions and answers in a quiz application

      Ah, you know what, I wasn't thinking straight. Sorry Tigger. [img]/ubbthreads/images/icons/smile.gif[/img]

      /me resists the temptation to go back and edit the post

      Here's what I should have suggested instead:

      Use two replace actions, one to replace the answer with the delimiter, and another to replace it without. You can make that only execute when the first one fails, if you want, but you don't have to (I probably wouldn't).

      Like so:

      replace "%variable%;;" with ""
      replace "%variable%" with ""

      If the first one doesn't get it, the second one will.

      Again, sorry for suggesting completely broken logic before. [img]/ubbthreads/images/icons/smile.gif[/img]
      --[[ Indigo Rose Software Developer ]]

      Comment


      • #18
        Re: Help with randomizing questions and answers in a quiz application

        Bruce,

        I am trying to figure out what is happening here. It appears that when AMS does the math it doesn't like the .8 or .9 but uses a whole number. So it will only be 0% or 100%.

        <font color=purple>IR</font color=purple> Is there a way in AMS to have this work? Work with a decimal number rather than a whole number?

        Thanks
        Jeremy
        TJ-Tigger
        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
        "Draco dormiens nunquam titillandus."
        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

        Comment


        • #19
          Re: Help with randomizing questions and answers in a quiz application

          NP Lorne, I did the same thing you did but I couldn't get it to work and had to walk away and think about it without thinking about it.

          If I understand your suggestion then, I should do a replace on the %variable% with the delimiter and on the next line after that do the replace again without the delimiter. Either way it should remove the correct variable, possibly with the delimiter if it is there or if not the next line will get it.

          And I see that there are no errors produced by this String.Replace option.

          One more questions for you Lorne. Does AMS work with a Decimal number? On the last page of the project, I am trying to take the total number of correct answers divided by the total number of questions (resulting in a decimal value) and multiplying by 100 to get a percentage. I then post this percentage to the main last page.

          Any ideas on this one?
          TJ-Tigger
          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
          "Draco dormiens nunquam titillandus."
          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

          Comment


          • #20
            Re: Help with randomizing questions and answers in a quiz application

            Thanks Tigg!
            Where are you hiding the dialog box that tells the end user they got the question correct? I have looked every where, I don't want to show that.

            "One more question for you Lorne. Does AMS work with a Decimal number? On the last page of the project, I am trying to take the total number of correct answers divided by the total number of questions (resulting in a decimal value) and multiplying by 100 to get a percentage. I then post this percentage to the main last page."

            Me too! LOL

            Comment


            • #21
              Re: Help with randomizing questions and answers in a quiz application

              1) First perform a string addition in order to add a decimal place and the number of digits you want as the decimal portion such as ".00" to each of your number values such as the total number and number correct.

              2)Next perform your division which will now yield your 2 decimal precision.

              3) Multiply that result by 100.

              4)Then peform a Variable.FormatNumber action in order to round the number to no decimal places.

              There may be an easier method, however that will work.

              Comment


              • #22
                Re: Help with randomizing questions and answers in a quiz application

                Just an addition to my previous post. A string consisting of numbers and a single decimal point is considered a real number in which case you can perform real number calculations such as division. Otherwise you will not receive the decimal portion of the calculation if it produces one.

                Comment


                • #23
                  Re: Help with randomizing questions and answers in a quiz application


                  Does AMS work with a Decimal number? On the last page of the project, I am trying to take the total number of correct answers divided by the total number of questions (resulting in a decimal value) and multiplying by 100 to get a percentage. I then post this percentage to the main last page.
                  This one's pretty easy: just change your formula to divide by 10.00 instead of by 10.

                  For each operation, AutoPlay preserves the number of decimal places that the value with the most decimal places has.

                  10.0 * 20.000 ---> 200.0000
                  5.00 * 2.5 ---> 12.50
                  3 / 3.00000 ---> 1.00000
                  etc.

                  As Darryl pointed out, you can then use the Format Number action to round or truncate the final value to the number of decimal places you want.
                  --[[ Indigo Rose Software Developer ]]

                  Comment


                  • #24
                    Re: Help with randomizing questions and answers in a quiz application

                    can you not divide 100 by the total number of questions, ie:

                    if there were 13 questions -
                    100/13=7.69

                    then add 7.69 to a figure in a global list each time a correct answer is given. If they get 9 correct answers they receive a total of 69.21% etc.
                    -
                    = Derek
                    ["All glory comes from daring to begin" - fortune cookie]

                    Comment


                    • #25
                      Re: Help with randomizing questions and answers in a quiz application

                      Bruce,

                      It is on the next button. That is also where the actions are that check to see if the answer is correct or not.

                      I was going to change the actions on the next button so that it adds 1.00 so the calculations work correctly. i will do that soon.
                      TJ-Tigger
                      "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                      "Draco dormiens nunquam titillandus."
                      Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                      Comment


                      • #26
                        Re: Help with randomizing questions and answers in a quiz application

                        The "You are Correct" dialogs have been disabled and the calculations work on the last page for scoring.

                        Hope you enjoy.

                        Tigger

                        13843-test proggie.zip
                        TJ-Tigger
                        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                        "Draco dormiens nunquam titillandus."
                        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                        Comment


                        • #27
                          Re: Help with randomizing questions and answers in a quiz application

                          < attachment

                          I had a bash at some radio buttons if anyone wants to use them.
                          (I got some check boxes up and running too)

                          13845-radio-buttons.zip
                          -
                          = Derek
                          ["All glory comes from daring to begin" - fortune cookie]

                          Comment


                          • #28
                            Re: Help with randomizing questions and answers in a quiz application

                            Nicely done Derek.

                            Corey Milner
                            Creative Director, Indigo Rose Software

                            Comment


                            • #29
                              Re: Help with randomizing questions and answers in a quiz application

                              Good job buddy!

                              Comment


                              • #30
                                Re: Help with randomizing questions and answers in a quiz application

                                Tigger-
                                I'm having a problem getting the test engine to see all the correct answers, I've poured over the Test and answers .txt and the coding and can't find it! Ikeep geting 80%, 90% but never 100%. Tell me what you think.

                                See attch.
                                Bruce

                                14379-test.zip

                                Comment

                                Working...
                                X