• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
greater than AND less than
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

greater than AND less than


  • Subject: greater than AND less than
  • From: Sean Malone <email@hidden>
  • Date: Sun, 26 Aug 2001 01:38:23 -0700

Hello,

I'm writing an application which averages grades for my students, based
on the number of assignments and their respective weight in the syllabus so
far so good. However, at the end, I'd like the script to return a letter
grade based on the score. The first score is easy:

-------

If finalAverage is greater than or equal to 96.5 then set contents of,
textbox "Computed Final Grade" to "A+"

-------

After this the trouble starts. Here are the ranges for the grades:

{{96.5, 100}, {92.5, 96.45}, {89.5, 92.45}, {86.5, 89.45}, {82.5, 86.45},
{79.5, 82.45}, {76.5, 79.45}, {72.5, 76.45}, {69.5, 72.45}, {64.5, 69.45},
{0, 64.45}}

I've pulled my hair out trying to figure out how to compare the
"finalAverage" to a range of scores. I've tried setting up a range using
things like:

(Reals from 92.5 to 96.45)

But this always returns that it "can't get reals.....etc."

So, does anyone know how I can get the script to return grades {"A+", "A",
"A-", "B+", "B", "B-", "C+", "C", "C-", "D", "F"} based on the ranges above?

Boy, If THIS would only work:

----------------

If finalAverage is greater than 92.65 or is less than 96.45 then...

----------------

One other question. After the grade is numerically averaged, I'd like
the result to not exceed hundredths - 86.45 etc. I've looked at the round
command, but that brings it up to an integer. How can the result be rounded
to nearest hundredth?

If you'd like to see the work in progress, there's a beta of this app I'm
trying to finish at:

http://darkwing.uoregon.edu/~spm29386/Software/index.html

It's my first app, so it's a little rough, but almost completely functional.

Thanks so much for your help,
Sean


  • Follow-Ups:
    • Re: greater than AND less than
      • From: Timothy Bates <email@hidden>
    • Re: greater than AND less than
      • From: Paul Berkowitz <email@hidden>
    • Re: greater than AND less than
      • From: Paul Berkowitz <email@hidden>
    • Re: greater than AND less than
      • From: "Bob.Kalbaugh" <email@hidden>
  • Prev by Date: Applescript to run a Photoshop 5.5 action
  • Next by Date: Re: Scripting Internet Explorer 5.0's preferences
  • Previous by thread: Applescript to run a Photoshop 5.5 action
  • Next by thread: Re: greater than AND less than
  • Index(es):
    • Date
    • Thread