TI-Basic Dude, optimization is key to programming (specifically TI Basic, where things can get slow very quickly). I was more than happy to have my program optimized because after all, this program is really for Morgan Ernst, not us. If your program can be optimized, you should be happy to have someone help you out and make it faster. We're all here to learn and grow in our programming knowledge, not restrict it. Don't be afraid to learn (or be helped), just go for it (or accept the help)!

Additionally, this doesn't follow the grading format the Morgan Ernst wanted. You gotta keep that in mind too.

]]>With your method of storing the exact answer to a string you would need to do what the OP was doing where you check if its in the bounds, and then display it. The only difference is that you would store it and only display it once. The optimized routine that we suggested is way more efficient, uses less conditional statements, and still gives the correct answer every time. Not to mention that it doesnt overwrite the string variables

]]>` ``PROGRAM:GRADING Clear Entries ClrHome Disp "Please enter the","total points","possible. Input "Total=",T //The maximum score (ex:20) Disp "Enter your","score. Input "Score=",S Disp "Calculating... S/T→A A*100→A Ipart(A→A //This will be the percentage of the score. "Failing If A>59 "Passing Ans→Str1 rand(50 //Time delay, this will act like the program is professional. ClrHome Disp "Your Results: Output(2,1,"0 For(I,0,A Output(2,1,I Output(2,4,"% rand(2 End Output(3,1,"Status: Output(3,8,Str1 Output(8,1,"Press ENTER. Pause ClrHome`

This is MY VERSION. DO NOT OPTIMIZE. Or, it will no longer be my version and unique! ]]>

:round(E2(E+.95F+.9G+.8H+.7I)/L,1→P

:int(.1P→X

E2 is the scientific E.

]]>` ``Instead of using output, do: "A-"→Str1`

E stands for the number of 4s they score

F stands for the number of 3.5s they score

G stands for the number of 3s they score

etc.

This equation takes the numbers they have earned and calculates a fair % to adjust the grades for the gradebook.

100((91E=.95F+.9G+.8H+.7I)/N)->L

From there I would like the calculator to show me both the grade % and the letter grade.

]]>` ``Repeat not(fPart(L ClrHome Input "# OF 4's:",E Input "# OF 3.5's:",F Input "# OF 3's:",G Input "# OF 2.5's:",H Input "# OF 2's:",I E+F+G+H+I→L End round(100(E+.95F+.9G+.8H+.7I)/L,1→P int(P/10→X Output(8,13,sub("ABCD",10-X,1 P-10X→Y Output(8,14,sub(" -+",2(Y<3)+3((Y≥6.9) and (Y<10))+((Y≥3) and (Y<7)),1 Output(7,13,P Pause ClrHome`

I believe this optimized code will work, eliminating the need for Else statements that we had to use before, although I don't know what the values mean, therefore I can't say it will work right away. What do E, F, G, H, and I represent?

` ``ClrHome Input "NUMBER OF 4:",E Input "NUMBER OF 3.5:",F Input "NUMBER OF 3:",G Input "NUMBER OF 2.5:",H Input "NUMBER OF 2:",I E+F+G+H+I->N 100((91E=.95F+.9G+.8H+.7I)/N)->L round(L,1->P int(P/10->X Output(7,12,sub("ABCD",10-X,1 Output(7,13,sub(" -+",(3((P-10X>=3) or (P-10X<=6.9))+2((P-10X>=7) or (P-10X<=9.9))+(P-10X>=0) or (P-10X<=2.9)) Output(8,12,P`

If you could explain your initial code, we could better help you :) ]]>

93-100=A

90-92.9=A-

87-89.9=B+

83-86.9=B

80-82.9=B-

etc.

Do I need to put multiple "Else" in the example above? Most examples I see only have two options either, or. But I need a program that has 10 different categories. Is this possible?

]]>` ``(x<y) or (y<z)`

EDIT: The "and" should have been an "or".

]]>Here's an example:

` ``:If K=30 :Then :X+5 :Else :X-5 :End`

If you have 'nested' conditionals, you would need to have multiple End commands back-to-back.

Looking at your above, I can immediately see that you have more Else commands than you need, which is why you're always getting 'A-' for all grades below an 'A'.

]]>I'll finish this very momentarily

]]>:ClrHome

:Input "NUMBER OF 4:",E

:Input "NUMBER OF 3.5:",F

:Input "NUMBER OF 3:",G

:Input "NUMBER OF 2.5:",H

:Input "NUMBER OF 2:",I

:(E+F+G+H+I) >N

:100(91E=.95F+.9G+.8H+.7I)/N)>L

:round(L,1)—>P

:If P≥93

:Then

:Output(7,12,"A")

:Output(8,12,P)

:Else:If 90≤P≤92.9

:Then

:Output(7,12,"A-")

:Output(8,12,P)

:Else:If 87≤P≤89.0

:Then

:Output(7,12,"B+")

:Output(8,12,P)

:Else:If 83≤P≤86.9

:Then

:Output(7,12,"B")

:Output(8,12,P)

:Else:If 80≤P≤82.9

:Then

:Output(7,12,"B-")

:Output(8,12,P)

:Else:If 77≤P≤79.9

:Then

:Output(7,12,"C+")

:Output(8,12,P)

:Else:If 73≤P≤76.9

:Then

:Output(7,12,"C")

:Output(8,12,P)

:Else:If 70≤P≤72.9

:Then

:Output(7,12,"C-")

:Output(8,12,P)

:Else:If 67≤P≤69.9

:Then

:Output(7,12,"D+")

:Output(8,12,P)

:Else:If 63≤P≤66.9

:Then

:Output(7,12,"D")

:Output(8,12,P)

Right now the final screen when I run the program will give me the correct percentage, but the grade is incorrect. If they received an A, it will show an A, but anything less than that is showing up as an A-. I'd really love any suggestions I can get. Thanks!

]]>