# Quiz

This checker is a pop quiz. The results show whether each answer was Correct or Incorrect, and calculates a total score.

Last updated

This checker is a pop quiz. The results show whether each answer was Correct or Incorrect, and calculates a total score.

Last updated

When should I use this template?

When we want to calculate a score based on the number of Correct/Incorrect answers.

Template walkthrough

Context

We are testing users on some math questions, and some multiple-choice questions. In the results, we want to show whether the answer to each question is Correct/Incorrect, and calculate their total score out of 100.

Step 1: Set questions

In the `questions tab`

, set up your quiz questions. In this example, we used a mix ofnumeric questions, andmultiple-choice questions.

Here's what it should look like:

Step 2: Set answer logic

Set correct answer in IF statement

Set "Correct" outcome in THEN statement

Set "Incorrect" outcome in ELSE statement

For math questions, because the answers are numbers, we don't need to put them in quotes. However we still need to **use the double equal operator (==)**.

For multiple choice questions, because the answers are text, we'll need to **put the answer in quotes (")** as well as **use the double equal operator (==)**.

Step 3: Set score logic

Let's count how many questions will return a Correct result. We can use a countif function to do this.

Count how many answers are Correct

Calculate it into a score out of 100

Since O1 to O7 will give the result of each question, we'll set that as our array. Our condition is to count how many will return "Correct".

Arrays must be defined with square brackets [ ], with inputs separated by a comma.

Now that we've got a count of how many out of 7 are Correct, let's change it into a score out of 100. We'll also use the round function to round it off to an integer.

Step 4: Preview

Let's `Save draft`

then `Preview`

our checker. View the questions and result format below.

In the `logic tab`

, we'll define our answers. Since we also want results to show whether the answer to a question was Correct or Incorrect, we'll use anIF/ELSE logic block to do this.

Create anIF/ELSE logic block

Because we don't intend to show this count in the results section, be sure tohide it from appearing.