2017년 3월 9일 목요일

GPA calculator

I'm having some difficulty designing a GPA calculator in Appinventor 2. I believe I have most of the calculations correct but I can't figure out a way to convert letter grades (A, A-, B etc.) to GPA numbers (4.0,3.7.3.0 etc). I think its something with my procedure. Can any of you guys check out my .aia file and offer an opinion?

--
I you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks...

To download the aia file, upload it to  App Inventor, open it, do some bug hunting for you, etc...
this takes time, and most people will not do that...

--
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.
I challenge you to add at least one more grade to your list to show that you understand how this works and post your solution here.
Can you also make it more flexible by allowing fewer than the maximum courses?
Keep in mind that attempting to use a blank text value in a math calculation will throw an error :(

--
Closing this issue as there has been no response from the original poster.

--