Scoring on a quiz

On my program it has a simple math quiz that generates random numbers to be added and then you input the answer and if its correct it prints "correct" and if its wrong it prints out the right answer. At the end its supposed to say how many you got right out of 5. I just cant figure out how to count up the ones i got right. Here is my program so far.
import java.util.Scanner;
import java.util.Random;
public class Phase1 {
     public static void main(String[] args) {
          Random random = new Random();
          Scanner scan = new Scanner(System.in);
          System.out.println("Welcome to Math Quizzer");
          for (int i=1; i<6; i++){
               int one = random.nextInt(11);
               int two = random.nextInt(11);
               System.out.print("What is " + one + " + " + two + "?");
               int answer = scan.nextInt();
               if(answer == one + two){
                    System.out.println("Correct!");
                    i++;
               if (answer != one + two){
                         System.out.println("Sorry but the correct answer is " + (one +two));
          System.out.println("You got " + " out of 5 questions");
}

I see that you're incrementing a variable if they get the answer correct, but is it the correct variable to be incrementing? Questions to help you think this through: How many questions are asked if the user gets them all correct? How many if the user gets them all wrong? Is it supposed to behave this way?
Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
&#91;code]
  // your code block goes here.
&#91;/code]good luck!

Similar Messages

  • Scoring in non quiz modules

    Hi,
    I have a course (captivate6) which does not have quiz in it but i need to record score in numbers...
    Is there any way we can do it? I tried the reporting option on the click of next button but the pauses that we have on each screen is no more there. Any solution you could suggest please.
    Look forward to your reply.
    Regard,
    Sona

    Hello and welcome to the forum,
    I don't understand your question really? What is scored in your course, since you are not talking about Question slides: interactive objects like Click boxes, Buttons, Text Entry Boxes?
    Score is not linked to a pause at all, do you see the pausing point in the timeline for the Next Button? Really, don't get why turning on the Reporting option for a button should change its Timing properties at all.
    And please, could you mention which version of Captivate you are using? If it is 6, please the complete version number (three versions around).
    Lilybiri

  • Partial Scoring on Matching Quiz Slide in Captivate 8

    Hi,
    I tried searching for the answer to this question before posting but I only located an answer for Captivate 5.5.  Is it possible to do partial scoring for a matching quiz slide in Captivate 8.  If not, does someone know a workaround?  It would also be helpful to me to know which questions slides allow partial scoring.  I am posting my trainings on an intranet site and not an LMS so I don't have the capability to do partial scoring from the LMS.
    Thanks,
    Jeff

    Only one type of question allows partial scoring: MCQ with multiple correct answers.
    Workaround is to create a custom question slide. The score can be stored in a variable, you'll have to collect the variable. Have some blog posts about partial scoring in custom question slides, before it appeared for MCQ in Cp. Here is an example:
    Widgets and Custom Questions - part 2 - Captivate blog
    I once created a custom matching question slide for a client (who never paid), using the D&D interactive widget from InfoSemantics, but that is only for SWF output.  And it had partial scoring.

  • Quiz variables not updating

    I am experimenting with the quiz variables in Captivate 4. I
    have a Flash file that loads a Captivate file. In Flash, I am
    pulling some of the variable data from Captivate... however, only
    some of the variables seem to be updating and I am not sure why.
    For instance, I have a few slides with click boxes that are set up
    to report quiz data.
    The following variables don't seem to update... at least
    publically that I can pull from Flash:
    cpQuizInfoLastSlidePointScored
    cpQuizInfoPointsscored
    cpQuizInfoTotalCorrectAnswers
    The following variables seem to be updating fine:
    cpQuizInfoTotalQuizPoints
    cpQuizInfoTotalProjectPoints
    I can also create a custom variable that seems to update
    properly.
    Thanks in advance.
    gregb

    Hi,
    The below variables gets populated once you start taking the
    Quiz.
    cpQuizInfoLastSlidePointScored - returns the points scored
    for your last question. You need to have this variable after every
    Question slide.
    cpQuizInfoPointsscored - returns the total points scored for
    the Quiz. You need to use it after the last Question.
    cpQuizInfoTotalCorrectAnswers - returns total correct answers
    after taking the Quiz.You need to use it after the last Question.
    Below variables gets prepopulated and need to not require
    taking Quiz -
    cpQuizInfoTotalProjectPoints - Total points for the project.
    cpQuizInfoTotalQuizPoints - Same as above one
    Please take the Quiz and check if the variables are getting
    populated appropriately and let me know if it helped.
    thanks
    ravi

  • Variables in Quiz

    Hello captivaters!
    I'm having a problem finding a variable in the Quiz report
    screen in captivate 2.0. At the end of a quiz is possible to
    display your results; total questions correct answerd, accuracy,
    maximum score and so on. This works great, but I want to know what
    the name (variable) and location (level) is for those numbers. I've
    searched the internet and documents... I even tried to decompile a
    movie, but I didn't work out.
    I have made a print functionality in MacroMedia flash whichs
    prints a cerficate, on this I want to print the results of the
    quiz. Who can help me solve my problem?
    Greetings from the Netherlands,
    Pascal Timmermans
    (flash user from the beginning, and verry happy with
    Capitvate 2.0).

    Hi,
    The below variables gets populated once you start taking the
    Quiz.
    cpQuizInfoLastSlidePointScored - returns the points scored
    for your last question. You need to have this variable after every
    Question slide.
    cpQuizInfoPointsscored - returns the total points scored for
    the Quiz. You need to use it after the last Question.
    cpQuizInfoTotalCorrectAnswers - returns total correct answers
    after taking the Quiz.You need to use it after the last Question.
    Below variables gets prepopulated and need to not require
    taking Quiz -
    cpQuizInfoTotalProjectPoints - Total points for the project.
    cpQuizInfoTotalQuizPoints - Same as above one
    Please take the Quiz and check if the variables are getting
    populated appropriately and let me know if it helped.
    thanks
    ravi

  • Backwards Navigation When Reviewing Quiz Questions

    I have discovered from some students that they can cheat on my quiz. They take the quiz, review their answers and make note of the correct answers, then either drag the navigation slider backwards or click the Back button to return to the beginning of the quiz. This resets their original answers and allows them to retake the quiz with the answers they took from their notes.
    The quiz is set up to allow multiple attempts, but I assume they should be starting over with each attempt. My quiz questions are randomized from a test pool, so hopefully they do not see the same questions again and not in the same order. However, by cheating in this way, they can take the same questions in the same order.
    Is there anyway to limit backwards movement when reviewing the quiz?
    I have turned off backwards movement while they are taking the quiz, but this setting is turned off when they start reviewing the quiz.
    I am using Captivate 5.

    Thanks for the information. Yes I have set the quiz up to allow users to review their answers. Yes I assume they will take notes on the answers, but I have not enabled the Retake Quiz button. Once they get to the results page and choose to review their answers, I assumed (incorrectly) that their answers would be locked and they would not be able to change the answers or results for their attempt.
    My instructions tell them to relaunch the training, go through it again, and then take the quiz again. With the questions and answers being randomized, I was hoping that their notes (question 1 answer is B - question 2 answer is C - etc.) would not be very helpful to them and they would put effort into taking notes from the training to help them on the test instead.
    You said the following:
    "If a user clicks the Review Quiz button after any attempt, they will be unable to perform a new attempt on that quiz until they relaunch the lesson again.  Also, if the user jumps outside the Quiz Scope by navigating back to any slide before the first scored object or quiz question, they will be unable to reattempt the quiz until relaunch."
    I have tested this out, launching the training from the LMS, and it is not correct. I can go through the quiz, review my results, drag the slider or click the back button to the beginning of the quiz, and take the quiz again.
    I have disabled backwards movement during the quiz, but once you start reviewing a quiz, backwards movement is once again enabled via the slider or back button.
    I can hide the playbar and navigation controls, but when you get to the review, the navigation controls remain hidden and you cannot advance through the questions to see the results. I thought of adding a separate Forward button on the quiz question slides to allow the user to go forward as they review the slides, but you cannot add buttons or clickboxes to question slides.
    I could certainly turn off the review functionality, but I think it is valuable information to the student. I need to allow them to retake the quiz, as my boss has set a very high bar (100% passing score) on the quiz.
    Does anyone have any other ideas?
    By the way, after typing up this response, I started doing some playing around, and I figured out a fix. I turn off the navigation controls before the quiz and enable the Skip button on each question slide. With the navigation off, the user can answer the questions and click Submit. Then when reviewing the answers, they can navigate forward by clicking Skip. They can no longer navigate backwards through the quiz and training material.

  • Negative scoring in Captivate

    I have read the discussions on not being able to have a negative scoring on a Quiz in Captivate 5.5.  Does anyone know of a JavaScript or anything that will do this?

    Have a look at Trihan's possible solution, described in this blog post:
    http://www.infosemantics.com.au/report_custom_scorm_variables_with_javascript
    Lilybiri

  • Retake/Review Quiz

    Hi all,
    I have a project where I added the button for the user to be allowed to retake the quiz infinite times. It is working ok so far until the quiz slide is followed by a content slide. When the user has re-answered the quiz  and click on "next", it goes to the content slides again. What I want it to do is just go through all the quizes that are marked wrong originally so the user can retake the quiz.
    There is also a simulation within the whole course. If the user failed, for some reason, it doesn't allow them go through the simulation again. I dindt create these files. I inherited them and I can't seem to find the connections that make it behave such. Please help.
    Thanks.
    Todd
    OR,
    since it appears to be going through the content, can i make the Retake Quiz button go from the beginning of the course instead of just from the first screen? I can't find the place to edit the action for the Retake Quiz button.
    Thanks

    Captivate doesn't currently support the workflow you are describing here.
    The Retake Quiz button that you can enable for the Quiz Results slide will jump the user back to the first scored object or quiz question in the module and set the quiz score back to zero at the same time.  This button will be available on the Quiz Results slide every time the user completes the quiz UNTIL they either pass the quiz or exhaust their allowed number of quiz attempts.  There is currently no provision in the Quiz options to only require the user to redo quiz questions they failed.
    If you have set up your own button somewhere that jumps the user back to the beginning of the module or to the beginning of the quiz, this is not going to be able to reset the quiz as well.  The quizzing variables are not controlled by Advanced Actions.
    With regard to your simulation, if you do not have the source files for it, then there's little hope of changing the way it works.  Sorry.

  • (CP4) Publishing Problems - zipping a .swf file

    Hello... please help!
    I have 3 presentations due in my LMS tomorrow. Each one has been imported from powerpoint. Each one includes .swf animations. Each one has a quiz with infinite attempts options and navigations buttons to restart presentation, take quiz again, or quit (for exampls).
    Only one of these presentations is publishing properly (and working smoothly in the LMS).
    The problem, when I publish a .swf and zip it, the .swf movie size is 0, and the question pool size is Huge. As a test I only have one quesion in my question pool. I've cross referenced the working file against the two that don't work and cannot find what I've done differently between them.
    Anyone have any suggestions? The pressure is on and I am out of ideas.......... thank you
    Dexy

    Hello,
    I do not understand why you do not let CP do the zipping while publishing? In the zip-file created by CP all the necessary files will be included. I could upload the zip to our LMS as a package and let it unzip by the LMS and start the HTML-file.
    If you want reporting to the LMS (scoring of the quiz) you need a to publish to a SCORM-object, which is also a zipped file with all what is necessary.
    So please, tell me why you want to zip yourself?
    Lilybiri

  • Licensing and Manifest File

    We have two Lic for Adobe Captivate2. When we try to package
    a captivate demo using SCORM, only one lic will create the manifest
    file for us. Both Lic were purchased at the same time. Please help.
    We just found out that when we package the same captivate
    file using captivate Macromedia captivate, all the necessary files
    are created and loaded successfully into our LMS (Saba).
    Unfortunatlly, I cannot say the same thing about Adobe
    Captivate 2.

    AS I understand it, a manifest won't be generated if there's
    nothing to
    track. I always assumed that meant at least one interaction
    had to be
    marked as 'scored' and the Quiz Manager settings had to be
    completed
    (type of tracking, etc). I don't know if 'track by slide
    views' means a
    manifest will be generated or not...
    But you're suggesting that on one system, without any scored
    interactions and no Quiz Manager settings, that a manifest is
    being
    generated with just 'track by slide views' checked?
    I'm not familiar enough to know if that's all that should be
    needed, nor
    if that option should result in a manifest.
    A common workaround for content that needs to be viewed but
    has no
    'quiz' is to place a scored interaction on the first slide
    that simply
    says something like 'Click here to begin'. Since everyone
    clicks to
    start the course, they automatically score 100%, which can be
    correlated
    to a 'completed' status.
    Erik
    hxdabbas wrote:
    > The settings are little bit different in both version. I
    tried my best to come
    > as close as possible. The zip file is produce but the
    manifest file is not
    > available. There is no quize to take. All I am trying to
    do is track by slide
    > views only option.
    >
    > I was told that there are some updates for Captivate 2
    on the Adobe site that
    > I cannot find.
    >
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - Authorware
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    samples, tips, products, faqs, and links!
    *Search the A'ware newsgroup archives*
    http://groups.google.com/group/macromedia.authorware

  • Reporting on Interactions in Assessment Simulation

    Hello,
    I'm testing my user's ability to navigate through a software interface and would like to be able to track and understand what interactions they might be getting hung up on. Thus, I want to be able to gather reporting data on individual clicks - what "clicks" are my users missing? etc.
    I see that I can give individual assessment clicks "Interaction IDs", but where can I view the reporting on those interactions? Other than seeing the user's overall scores for the assessment, can I 'drill down' an see how they did on each scored click???
    Also, if I have a combination of scored interactions and quiz questions (i.e. multiple choice) in an assessment, can I pick apart the data and see if incorrect answers were wrong clicks or wrong quiz answers?
    Thanks!
    Alex

    This is a question you should be asking of your LMS administrator or the LMS Vendor.
    The reporting capabilities of your LMS determine whether or not you can drill down into the SCORM data sent by the Captivate module.

  • Can You Have Two Separate Quizzes in One Captviate SCO?

    Greetings,
    Here is my problem:
    Ideally I would like this question addressed via the other problem I posted to the board just a moment ago (re: multi-SCO package freezing at the end of the first SCO).  HOWEVER, I would take this solution as well:
    We want two have three parts to our SCOS.
    1. Pre-Test
    2. Instructional video
    3. Post-Test
    The learner need not pass the pre-test to proceed to video, nor do they need to pass the pre-test to pass the course.  The pre-test is really just a knowledge check.  The video must be watched, and the post-test must be taken and passed.
    When I try to insert multiple quizzes in Captivate, it only lets me put in 1.  Even if I split the test w/ a video, it treats it as one test.  Even if I make the initial quiz questions suvey, it treats it as one test.  The reason just making them survey questions won't work is because if they want to re-take the post-test (which we want them to be able to do), they have to go back to the first slide.
    I'd like the pre-test scored as a quiz, then the video, then the post-test taken and scored as its own quiz.  It SEEMS like this ought to be possible, seeing as I am almost positive that you can have mutliple quizzes in a Presenter SCO (and that you can do that in Articulate and Lectora), but I am not seeing how.
    Thoughts??

    Hi there
    Sorry, but any given Captivate project is considered to be a single Quiz. If you want things to be different, please alert Adobe to it by submitting a Wish Form to ask for it in a future version. (Link to the Wish Form is in my sig)
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Adobe Captivate 5 - Problem with scoring with Quiz exported to PDF

    Hello,
    I have created several review quizzes that have been exported to pdf and uploaded to the internet. They are elementary school quizzes that are listed on a canned school web hosting site that only allows uploads in common formates such as Microsoft Word and pdf.
    I tested these pdf quizzes with no problems and from my  computers they still work fine; however some people are having problems with the scoring element. Some - not all questions are not tabulated correctly in the end review section. I have been told that the questions were answered correctly but the end review showed some questions as wrong or not answered. The quizzes are reveiw only and no reporting or LMS is used.
    Has anyone else seen this? I had a feeling that perhaps the adobe reader was at fault, but so far everyone is using reader version 9.
    One of the quizzes can be found here.. http://www.germantownschools.org/faculty/jwoger/4th_math_topic_1_quiz[1].pdf
    Tim

    Hi,
    I have since my initial post been told that certain elements of the quiz slides are also not working. Correct answers have a sound clip that plays when the "correct" option is selected.  This is not working for some users. Like I said I have no problem with the pdf quiz from any  of the computers I use and don't know why it doesn't work for others.
    tim

  • Quiz scoring seems to be all or nothing?

    Sorry if this is already answered elsewhere...
    I create 1 quiz slide, eg fill in the blank, and have 8
    blanks to fill in, and give the 'Points' field a value of 8.
    Yet when I take the quiz, I have to get all 8 correct to get
    the 8 points. If I miss even 1, I get 0 out of 8.
    (yes I could put each of the 8 blanks on its own fill in the
    blank slide, but that's not practical for what I'm doing)
    Why doesn't there seem to be a scoring option for 7,6,5...
    out of 8 correct? This also seems to be the case with other quiz
    styles. Why is it all or nothing scoring?
    Thanks for any help,
    Keith

    Hi Keith,
    I'm finding the same, unfortunately. What sort of Hitler
    designed the fill-in-the-blanks slide? "You scored less than 100%,
    you worthless wretch. You must walk the plank."
    How hard is it to loop through the fecking answers, checking
    each one against a value? It's 2 arrays and a loop.
    Please feel free to reply with a repudiation if we've
    overlooked something here.
    Thanks.
    Pete.

  • Quiz Scoring When Branching

    Hi all,
    I'm on CP5 for Mac.
    I have a short quiz with two questions. If they get the first question correct, I want to take the learner to a second question slide based on implicit feedback. If they miss the first question, I want to take the learner to a second, different slide that is, again, based on implicit feedback. Point is, I want to go to two different places depending on if the first question is correct. I know I can use an advanced action to make this happen.
    The second slide is basically asking the same question whether or not the learner got the first question right. My path looks like a "Y"... which means I have three questions in the quiz. I only want two questions to be scored. Here's my question: what kinds of problems will this approach present for CP? Is there a better workflow to create this type of quiz that I should be aware of?
    I have to report results to an LMS.
    Thanks,
    Kevin
    P.S. Lillybri, just getting this one out there to get some feedback while I go work your tutorials. :-)

    The above approach worked. I created a user variable called q1Correct. On entering the first question slide, I ran an action called initScenario and set q1Correct with a default value of 0 in anticipation of the learner getting the question wrong. On exiting the slide, if the learner answered the question correctly, I ran another action called q1IsCorrect and changed the value of q1Correct to 1; then I jumped to question slide 2. If the learner missed the first question, I just jumped to slide 2 - since q1Correct already had a default value of 0, indicating that the answer was wrong, I didn't need to run any actions on exit with an incorrect answer. On the second question slide, I checked the value of q1IsCorrect in a third (conditional) action, and showed my custom text accordingly. More specifically, if q1Correct was equal to 1 (meaning the answer was right), then I showed the appropriate text caption. Conversely, if q1Correct was 0 (meaning the earlier answer was incorrect), I showed another text caption.
    Case closed.
    Kevin

Maybe you are looking for

  • Disconnecting the credit card from my apple id

    Is there any posibility to not to link any of the crdit cards for apple id. Because i want to give my credit card info when iam purchasing apps at app store at that momoent. help me.....

  • My CS3 disc is damaged. But I have got my serial number.

    How can I reinstall my Adobe CS3 if disc containing it is scrached but I have the serial number? Is any place I can download the instalation files? I haven't registred my purchases online.. Thanks for your time and answers!

  • Passing User Parameters through Run_Report_Object

    hi, How to pass multiple user parameters through run_report_object.example i have to pass 20 parameters, have i write 20 statements? is there any way to come in single statement.i am using Forms 6i. thks in advance,

  • Skipping security questions and answers

    Since recently, my iPad (but also iTunes on my mac) asks me for security questions and answers when I try to download an app. How can I download apps without providing these questions and answers?

  • ODI not picking the file generated through calcscript

    Hi John, We have used samba and mapped the folder from linux to windows.We named the drive and specified the path. Now i ran the interface which invokes the calcscript for data extraction and the script ran well.I t generated the file. But the file i