CheckFirst
  • CheckFirst
  • Get started
    • Tutorials
      • Yes/No
      • Quiz
      • Constants table
      • Date calculator
      • Complex example
    • Logic Syntax
  • Features
    • Questions
    • Constants
    • Logic
      • Calculator logic
      • Conditional logic
      • Date logic
      • Map constant
      • Results formatting
    • Settings
  • FAQ
    • Full Logic Syntax List
  • Contact Us
  • Updates
Powered by GitBook
On this page
  • When should I use this template?
  • Template walkthrough
  • Context
  • Step 1: Set questions
  • Step 2: Set answer logic
  • Step 3: Set score logic
  • Step 4: Preview

Was this helpful?

  1. Get started
  2. Tutorials

Quiz

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

PreviousYes/NoNextConstants table

Last updated 3 years ago

Was this helpful?

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

  1. Set correct answer in IF statement

  2. Set "Correct" outcome in THEN statement

  3. 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 (==).

N1 == 10

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 (==).

R5 == "Weasley Joke Emporium"

Step 3: Set score logic

  1. Count how many answers are Correct

  2. 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".

countif([O1,O2,O3,O4,O5,O6,O7],"correct")

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

round((O8/7)*100)

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

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

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

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 function to round it off to an integer.

countif
round