Homework: Associate Number with Letter

I am tasked by my professor to create an app that takes a numerical input for a grade 1-100. The numerical value is stored in a table and as values are entered the app calculates the average grade in number value and is also supposed to display a grade value for the range. For instance A >= 90
B 80-89 so on and so forth. I am stuck at the part where the app takes the average grade calculation and outputs a letter value associated with the range. here is a screenshot

A simple way to assign letter grades is to use if..then conditional statements. See Programming Your App to Make Decisions

If numerical value >= 90 then A else if numerical value <90 and >= 80 then B else if ...for the other letter grades. try some Blocks :slight_smile:

1 Like

3 Likes

You are a life saver. I just tested the first 2 letter grades and it worked great. Here is a screenshot!

Use the blue mutator button to add extra rungs to your if/then/elseif ladder ...

mutator

Thank you for your input. This was just a screenshot of me starting to add blocks. Here is the most updated version.

You might be missing a requirement here.

Consider the grade curve, where you tally up how many students got A, how many got B,...

A dictionary would be good for building that (key = letter grade, value = running count that got that grade), and the new Graphs component would be good for showing the grade curve.

1 Like

I see what you are saying but this assignment is very basic and covers lists of data mainly. We haven't been taught dictionary stuff yet so it is safe to assume that isn't a requirement for this assignment. Either way thank you for being here to help!

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