How do I convert percentages to letter grades?

im making a quiz app for school and at the end of result screen i want them to get a grade depending on their score i made these blocks but its not working whats the issue

What is happening? What are the results you are getting? What are the blocks that set the score?

basically its a quiz app every time you choose a correct answer it is saved in variable called app score
so what i want is that if i have 100 question (app question number) in my quiz and person answers 80 correct (app score) i want it to do 80/100 x 100 = 80% which is grade B

I get WHAT you are doing, I was asking what RESULTS you are getting as you say it isn’t working. I can’t recreate your issue based on the blocks you are showing. Somewhere you have blocks that tell the app if the answer was right or wrong and sets your score variable.

First the percentage and LetterGrade are initialized to what?

Also add a new label and change label text to “percentage” variable so we know what values you are getting.

they intitalized to nothing
can you make blocks and show me please?

remix thunkable quiz app and show me my codes are very similiar because i remixed it for myself

well if you want help, you will have to share your app to make it much easier and faster to fix

i cant share app sorry :confused:

Thats fine but if you truly want help, you will either tell us what the values you are getting are from the variable I asked for or share a part of the app.

1 Like

im not getting anything i just checked all i get is my score but not letter grade ;/


as shown i want to give letter grade depending on their result but i dont know why its not working i just tried again and i got A+ for 85 score (total questions are 136) whereas 85 out of 136 is 63% whic is not an A or A+ help !

That is because you set your logic in reverse.

Suppose someone got a score of 60%.
First test is “is score less or equal to 95%?”

With 60%, I’d say the answer is ‘yes’, so the app says “Your garde A+ (excellent!)” which I think is not what you desire.

What you need is to check if the score is ABOVE 95.
Change all those “≤” with “≥” and things should be OK.

by the way, since Alert1.Title is always set to “Your Grade”, you could put it out of test sequence. Same for the “Score2 / Question Number2 * 100” bit, it could be calculated only once and put in a variable and then used for the comparison. In fact, all that test “if else if” block need to set is the value of Alert1.Message; the rest can be pulled out of there for a much smaller block count.