Trying to push the limits of App Inventor!
Snippets and
Tutorials from
Pura Vida Apps by
Taifun.
After looking at your blocks and the way that it was recommended that GPA be calculated here: http://www.wikihow.com/Sample/GPA-by-Credits
I felt it best to show how you can use the TextBox component blocks to iterate through the two lists needed to build the totals for the GPA calculation.
It was not as simple as I initially thought it would be when thinking about averaging a set of grades.
total credits is easy to sum up, but total grade points is the total of the credits X scale values for each grade - and the scale value must be looked up with the letter grade.
The solution shown uses advanced TextBox.Text blocks and it is assumed that all five letter grade and credit boxes are filled with values.
Allowing for less than five letter grades and credit values would require additional blocks to determine when to stop adding.
This could be done by the user entering the number of grades or having a loop that adds 1 to a counter until it reaches 5 or the first empty TextBox.