An Algorithmic and Social Introduction to Computer Science (CSC-105 2000S)


Describe unambiguously how to find the lowest grade in a list of grades.

Adan

Set the grade levels to a numeric value with 0 being the lowest and 100 being the highest. If there is a decimal value, round off. If decimal is greater than or equal to 0.5 round up one. If decimal value is less than .05 round down one. If the grades are in letter format, ask user to enter a numeric value in accordance to the following scale:

1) Read the first number on list. Set as lowest value and store in memory as variable X.

2) Recover X from memory. Subtract X from 100. Set answer as X.

3) Read next number on list. Subtract number from 100. Set answer as Y.

4) Recover X and Y from memory. If Y is greater than X, set Y as X. If not, go to step 5.

5) Repeat step 3 until the end of list.

Variable X = the highest difference between numbers and 100, hence X is the lowest grade on the list.

Cathy

1. Look at the first grade in the list.

2. Compare it with the second grade.

3a. If the grades are letters: the grade closer to the end of the alphabet is the lower grade, select this grade and discard the other.

3b. If the grades are numbers: subtract the second grade from the from the first grade,

4. Repeat steps 1-3 until there are no undiscarded grades left in the list,

5. The final selected grade should be the lowest grade.

Ivy

(Assuming that the grades are listed by letter (rather than percentages) and assuming the person looking for the lowest grade knows all the letters of the alphabet, how to alphabetize, and recognizes plus and minus signs.)

1) Put the list of grades in alphabetical order (A-F).

2) Look through the list of grades and identify any F's. If F's are found, skip to step 4. If no F's are found, go to step 3.

3) Look through the list of grades and identify any D's. If D's are found, skip to step 4. If no D's are found, go to step 5.

4) Congratulations, you have found the lowest grade (or grades) in the list.

5) Look through the list of grades and identify any C's. If C's are found, skip to step 6. If no C's are found, go to step 7.

6) Examine the C's. If you identify any C's not followed by a plus sign, go to step 4. If you identify ONLY C's followed by a plus sign (and none without), go to step 4 as well.

7) Look through the list of grades and identify any B's. If B's are found, skip to step 8. If no B's are found, go to step 9.

8) Examine the B's. If you identify any B's followed by a minus sign, go back to step 4. If there are NO B's with minus signs, but B's followed by no sign whatsoever, go back to step 4 as well. If there are ONLY B's followed by plus signs, go to step 4 now.

9) Look through the list of grades and identify any A's. If you identify any A's followed by a minus sign, go to step 4. If there are NO A's with minus signs, but A's followed by no sign whatsoever, go to step 4 as well. If there are ONLY A's followed by plus signs, go to step 4 now.

Jae

1. Identify a list of numerical grades, and remember all the grades.

2. Identify the lowest number (number closest to zero).

3. Output the number.

Jeana

Assuming you know the grading system (that an A is higher than a B, that a B- is better than a C+, etc.): 1. The first grade on the list will be your initial base grade, the grade against which you will begin to compare the others in the list.

2. Look at the second grade on the list. If it is lower than the initial base grade, then replace the initial base grade with this lower grade. This lower grade would become your new base grade. (For example, if the initial base grade (the first grade on your list) is a B+, and the second grade on the list is a C-, the C- becomes the new base grade.) If the second grade on the list is the same or higher than the first grade on the list, disregard it, keep the first grade on the list as your base grade, and continue to move down the list.

3. Look at the next grade on the list. If it is a higher grade than your most curent base grade, disregard it and continue to move sequentially down the list. If it is a lower grade, replace your existing base grade with this new lower grade.

4. Continue to move sequentially down the list, repeating step #3 until you reach the end of the list. You should end up with the lowest grade on the list.

Jeff

value of digits 0-9 base-10.

X is used as place holder and can have any value 0-9

0 has no value

1 has a single value

1 = 1 has a single value

2 = 11 has a multiple value or a single value + single value

3 = 111 has a multiple value or a single value + single value + single value

1X = 111111111 + X has two separate functions

1XX

1XXX

a series of numbers n (3, 7, 13, 4) is (111, 11111111, 1111111111111, 1111)

Joel

First, you need to know what each grade is and what each of them correspond to (you could do this by assigning a number to each grade - with the lowest number corresponding to the lowest grade and the highest number corresponding to the highest grade and so forth - to help you determine which is the lowest grade). Then you could list the grades in order from greatest to least (top to bottom), by their corresponding number value, and whatever number is at the bottom of the list is the lowest number, and therefore the lowest grade.

Kevin

0. Instructions are to be executed only after the numbered instructions have been read to their ending point, denoted by a "." and blank line after the text of the numbered instruction. Information may be contained after an instruction which is crucial to its completion. Go to step 1.

1. Grades are usually numbered, but may sometimes be letters. Go to step 2.

2. If the grade is a number, continue to step 3. If the grade is a letter, go to step 3a. Instructions will follow at that point.

3. Numbers for grades are usually set on a scale from 0-100, with 0 being the lowest possible grade and 100 being the highest possible grade. Numbers higher than one-hundred are possible, and should be treated numerically as they should be. Go to step 4.

4. In a list of numerated grades, some numbers may be higher than others. Take the first grade in the list and compare it theoretically to the second. One grade may be higher than the other. If so, the higher number is to be disregarded mentally. If so, continue to step 5. If not, continue to step 5.

5. Take the number (or numbers) remaining from step 4 and compare them to the following number on the list. If the original number (or numbers) is lower than the newly introduced number, then disregard the new number and continue to step 6. If the new number is lower than the previous number (or numbers), then disregard the previous number (or numbers) and continue to step 6. If the previous number (or numbers) is equal to the new number, none are disregarded. Go to step 6.

6. Repeat step 5 until such time that no more numbers can be compared. This means that all numbers higher than this lowest number (or numbers) have been disregarded, and the remaining number(s) should be the lowest. There may be several instances of the same lowest number, as previously mentioned. This is not an error, but rather means that several students attained the same grade. Go to step 7 unless previous instructions tell you otherwise.

7. Remember or write down this lowest number for potential record-keeping. Go to step 8.

8. Comparison complete for a numbered grades in a list.

3a. Lettered grades work in a manner similar to number grades. The alphabet consists of 26 letters, A-Z, in which A is considered numerically equal to 25 and Z is considered numerically equal to 0. Go to step 3b.

3b. It should be noted that several sub-characters may modify the meaning of letter grades. A "-" denotes a grade that is lower by 0.1 numerically than the grade it is modifying. A "+" denotes a grade that is higher by 0.1 numerically than the grade it is modifying. These modifiers are to be added or subtracted to the numerical value of whatever letter grade these characters directly modify. Go to step 4a.

4a. After changing the letter grades to numbers, compare each newly numbered leter grade in a manner equal to that described in step 4. Follow steps 4-6. Upon completion of step 6, go to step 7a.

7a. Convert the resulting "lowest grade" of the lettered grades from the numerical equivalent back to its letter grade. Grade modifiers are to be converted back to their original sub-character notation and placed after the numerical grade in a manner immediately following the letter grade. Go to step 8a.

8a. Remember or write down this lowest letter grade for record-keeping. Go to step 9a.

9a. Comparison complete for letter grades in a list.

Liz

Nothing received?

Sam

First the list must be evaluated. I suggest going down the list and grouping together identical scores, so a variety of categories are formed. The list is now smaller, as the specific quantity of each score is irrelevant. Only the different scores matter. If there are no repeat scores, proceed to next step.

Next organize the scores numerically in order, with the highest score first, the next highest second, and so forth. This is achieved by finding out the highest possible score on the test(perfect score) and placing the scores closest to this number at the high end of the list, and the score furthest from the highest possible score last. The score that has the greatest difference from a perfect score is the lowest score on the list.


Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS105/2000S/Questions/question.08.html

Source text last modified Sun Feb 13 09:55:44 2000.

This page generated on Wed Feb 16 08:36:21 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu