Trouble with multiple variables and incorrect output from list

So I’m having a problem with the app I’m writing.
I need to take the values of 5 separate variables and add them together, then output a grade depending on the combined value. I thought I figured out how to do that by creating a list; however it always comes up as an F no matter what. I put the debugging label in to see the app variable total, which should have either a maximum of 30 or a minimum of 6; however, it always seems to return a 2.
I’ve attached a screenshot of all the code for that screen. If anyone knows what I’m missing, I

would appreciate it
thank you

You’re saying that these blocks set app variable total to 2:

So the question is why. To find out the answer, you’ll need to work backwards. If the max of a list is 2 then the largest value is 2. Have you displayed all of the app variables in the list (used for “max of list”) to see what their values are within the “total calculate” function?

If the highest value is 2 then you know you need to look at your other functions to figure out why they are returning such low values. If the highest value is higher than 2, it’s possible that you are providing a list of text strings (“35” instead of the integer 35). In that case, you’d need to convert each variable to a number by adding zero to it before creating the list in the “max of list” block.

I’m still working on the problem, but it does seem to be an error in the hourly wage calculate function. I checked the blocks for the calculate function, and it is correct, but for some reason, the wage function returns a 2 no matter what is entered. I’ve tested the same type of function in a test app and it seemed to work fine but ill have to check and see where I went wrong.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.