Question
I am trying to write this code using Raptor (flowchart). I have half of it down but it just not working. Please help. Problem: A
I am trying to write this code using Raptor (flowchart). I have half of it down but it just not working. Please help.
Problem: A program that grades an online math quiz. The program asks the student to enter his/her answer to 10 multiple-choice questions. All of the quiz answers are integers. The program stores the students responses in an array and then compares those responses to the correct answers to determine the students grade. The correct answers are: #1 is 5 #2 is 22 #3 is 35 #4 is 0 #5 is 16 #6 is 28 #7 is 4 #8 is 3 #9 is 42 #10 is 52
Your program must use this main procedure which calls the three procedures you are to implement. setCorrectAnswers takes an out parameter, corrrectAnswers, which is an array of integers. It sets each array element to the correct answer according to the table above. inputAnswers takes an out parameter, givenAnswers which is also an array of integers. It asks the student to input their answers to each of the 10 questions. This procedure must use a loop. numberCorrect takes both correctAnswers and givenAnswers as in parameters and has an integer out parameter, numRight. It sets numRight to the number of questions the student answered correctly. Hints numberCorrect will require a selection nested inside a loop. Sample Output (input in BOLD) Please enter your answer for question #1 5 Please enter your answer for question #2 21 Please enter your answer for question #3 35 Please enter your answer for question #4 0 Please enter your answer for question #5 16 Please enter your answer for question #6 29 Please enter your answer for question #7 4 Please enter your answer for question #8 3 Please enter your answer for question #9 42 Please enter your answer for question #10 52 Your quiz grade is 80% displays which question numbers the student got wrong. It could look like this: You answered the following questions incorrectly: 2 6
(Here are some pictures of how my flowchart looks, I keep getting a variable array NOt found message)
Raptor - Raptor.rap File Edit Scale View Run Mode Ink Window Generate Help 125% Symbols Assignment Lab 8 Quiz Grader Flowchart Written by Maryam Hashim Start Call Input utput setCorrectAnswers (correctAnswers) Selection inputAnswers (outgivenAnswers) Loop numberCorectincorrectAnswer ?ngivenAnswers, outnumRight) PUT "Your quiz grade is" +10 * numRight + % End 6:04 PM 4/4/2017 Raptor - Raptor.rap File Edit Scale View Run Mode Ink Window Generate Help 125% Symbols Assignment Lab 8 Quiz Grader Flowchart Written by Maryam Hashim Start Call Input utput setCorrectAnswers (correctAnswers) Selection inputAnswers (outgivenAnswers) Loop numberCorectincorrectAnswer ?ngivenAnswers, outnumRight) PUT "Your quiz grade is" +10 * numRight + % End 6:04 PM 4/4/2017Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started