0
Answered

Calculate max of 4 variable nodes

shane 8 years ago updated by Praveen Srinivasaiah (Admin) 8 years ago 3

I have 4 variable nodes that contain numerical values. How do I calculate the maximum of these 4 numbers, and then display the name of the variable with the max value?


I'm guessing that I'll probably need to use API node. Can someone explain to me the high-level concept of how to do it? Cos I don't have much programming experience.


Thanks!

Answered

Hi Shane,


I've gone ahead and added a template episode (Quiz template) in your bot "BerryQ Chatbot". Let me know if this helps you out in creating your Quiz bot.

Thanks Praveen! I looked through the template and it seems to calculate the quiz score.


What im creating in this case is a personality test (eg which hollywood celebrity are you?)


There are a total of 4 outcomes (each outcome maps to a celebrity). Throughout the test, im keeping track of the scores of 4 outcome variables. At the end of the test, the outcome with the highest score will be presented to user.


Is this doable

Hi Shane,


I've gone ahead and added a Personality quiz template in your bot (Episode 4). Let me know if this helps.