Answered

Logic

  • 23 April 2023
  • 4 replies
  • 56 views

Hi guys I am creating my 1st quiz, the answers are A or B.  I want to create a logic to add all the A results and alll the B results to give the following outcomes 

If calculated more A answers than B answers you are X

If calculated more B answers than A answers you are Y

If calculated answers A and B are = you are Z

How do i create this?

 

icon

Best answer by john.desborough 23 April 2023, 16:22

View original

4 replies

Userlevel 7
Badge +6

@Lisalissh - create variables for a and b to act as subtotals and every time someone selects A, add one point to the a_subtotal using logic rule, same if they chose B add one to b_subtotal 

then at the end you have the logic rules that do the following:

  • if a_subtotal is greater than b_subtotal then go outcome page/ending for X
  • if b_subtotal is greater than a_subtotal then go to outcome page/ending for Y 
  • if A_subtotal = b_subtotal go to the outcome page/ending for Z

you could also do similar by creating a variable for the outcome type (say v_outcome) and then the logic would be like this: 

  • f a_subtotal is greater than b_subtotal then replace v_outcome with X
  • if b_subtotal is greater than a_subtotal then replace v_outcome with Y
  • if A_subtotal = b_subtotal then  replace v_outcome with Z

you can recall the the variables onto the screen using the @recall function (just type the @ sign and the list of variable should appear for you)

 

hope this helps

 

des

thank you bunches can you let me know if this is what you had in mind please?

 

Userlevel 7
Badge +6

@Lisalissh - i tend NOT to use @score for this because in all cases, either A or B you are adding 1 to score… 

use the Logic section to create variables for the subtotals for each of A and B

once you have the variables created for the subtotals you can add the points to the appropriate subtotal

des

ahh tx u

 

Reply