I'm pretty new at Ti-Basic, but I'm trying to learn more about it. This project calculates your weighted GPA (AP -> 5, HRS -> 4.5, GHP/CP -> 4). I just finished the GPA calculation. Future features may include it graphing your GPA over time, calculating weighted and unweighted GPAs, and allowing you to save previous GPAs.

Feedback is appreciated!

Things to do:
Class name input
Previous GPAs
GPA goal
How much increase in grades for the desired GPA
GPA grapher
Unweighted GPA calculator
Fewer bytes

Finished Things:
Weighted GPA calculator

Code:
```ClrHome DelVar ADelVar HDelVar CDelVar ZDelVar GDelVar BDelVar XDelVar EDelVar DDelVar PDelVar FDelVar JDelVar K Lbl ME Menu("GPA Calculator Options","Calculate",1,"Conversion Table",2,"Coming Soon",3,"Coming Soon",4,"Coming Soon",5,"Help",6,"Quit",7 Lbl 1 Input "How many AP classes?: ",P Input "How many HRS classes?: ",H Input "How many CP/GHP classes?: ",C For(Z,1,P)    Input "AP Grade %: ",X        If 0<X and X<=59    Then       0+G->G    End    If 60<=X and X<=69    Then       1+G->G    End    If 70<=X and X<=72    Then       2.67+G->G    End    If 73<=X and X<=76    Then       3+G->G    End    If 77<=X and X<=79    Then       3.33+G->G    End    If 80<=X and X<=82    Then       3.67+G->G    End    If 83<=X and X<=86    Then       4+G->G    End    If 87<=X and X<=89    Then       4.33+G->G    End    If 90<=X and X<=92    Then       4.67+G->G    End    If 93<=X and X<=100    Then       5+G->G    End    If X>100    Then       Disp "Sorry, but your number is","greater than 100. Please","try again. Press ENTER","to continue.       F+1->F       Pause    Else    End End For(E,1,H)    Input "HRS Grade %: ",X        If 0<X and X<=59    Then       0+B->B    End    If 60<=X and X<=69    Then       1+B->B    End    If 70<=X and X<=72    Then       2.17+B->B    End    If 73<=X and X<=76    Then       2.5+B->B    End    If 77<=X and X<=79    Then       2.83+B->B    End    If 80<=X and X<=82    Then       3.17+B->B    End    If 83<=X and X<=86    Then       3.5+B->B    End    If 87<=X and X<=89    Then       3.83+B->B    End    If 90<=X and X<=92    Then       4.17+B->B    End    If 93<=X and X<=100    Then       4.5+B->B    End    If X>100    Then       Disp "Sorry, but your number is","greater than 100. Please","try again. Press ENTER","to continue.       J+1->J    Pause    End End For(D,1,C)    Input "CP/GHP Grade %: ",X        If 0<X and X<=59    Then       0+A->A    End    If 60<=X and X<=69    Then       1+A->A    End    If 70<=X and X<=72    Then       1.67+A->A    End    If 73<=X and X<=76    Then       2+A->A    End    If 77<=X and X<=79    Then       2.33+A->A    End    If 80<=X and X<=82    Then       2.67+A->A    End    If 83<=X and X<=86    Then       3+A->A    End    If 87<=X and X<=89    Then       3.33+A->A    End    If 90<=X and X<=92    Then       3.67+A->A    End    If 93<=X and X<=100    Then       4+A->A    End    If X>100    Then       Disp "Sorry, but your number is","greater than 100. Please","try again. Press ENTER","to continue.       K+1->K    Pause    End End Disp "GPA: ",(A+B+G)/(P+H+C-F-J-K) Disp "Press ENTER to continue. Pause Goto ME Lbl 2 Menu("Conversion Table","AP",AP,"HRS",HR,"GHP/CP",GH,"Go Back",ME Lbl AP Output(1,1,"93-100: 5.0 Output(2,1,"90-92: 4.67 Output(3,1,"87-89: 4.33 Output(4,1,"83-86: 4.00 Output(5,1,"80-82: 3.67 Output(6,1,"77-79: 3.33 Output(7,1,"73-76: 3.00 Output(8,1,"70-72: 2.67 Output(9,1,"60-69: 1.00; 0-59: 0.00" Pause ClrHome Goto 2 Lbl HR Output(1,1,"93-100: 4.50 Output(2,1,"90-92: 4.17 Output(3,1,"87-89: 3.83 Output(4,1,"83-86: 3.50 Output(5,1,"80-82: 3.17 Output(6,1,"77-79: 2.83 Output(7,1,"73-76: 2.50 Output(8,1,"70-72: 2.17 Output(9,1,"60-69: 1.00; 0-59: 0.00" Pause ClrHome Goto 2 Lbl GH Output(1,1,"93-100: 4.0 Output(2,1,"90-92: 3.67 Output(3,1,"87-89: 3.33 Output(4,1,"83-86: 3.00 Output(5,1,"80-82: 2.67 Output(6,1,"77-79: 2.33 Output(7,1,"73-76: 2.00 Output(8,1,"70-72: 1.67 Output(9,1,"60-69: 1.00; 0-59: 0.00" Pause ClrHome Goto 2 Lbl 3 Lbl 4 Lbl 5 Disp "Coming Soon!","Press ENTER to continue. Pause ClrHome Goto ME Lbl 6 Disp "This is the GPA","calculator. Round your","grade percentage up if","there are any decimals","Please input a number","","Press ENTER to continue. Pause Goto ME Lbl 7 ClrHome```
Nice work on getting started with TI-BASIC! So far it looks like you are getting the hang of things. Here's some small suggestions:

You can use the evalution of an If statement in an expression, like so:

Code:
```   If 60<=X and X<=69    Then       1+G->G    End === is the same as === G+(0<X and X<=59)->G```

You can use the Pause command with a string:

Code:
`Pause "Press ENTER"`

Anyway, looks pretty neat so far; are you using SourceCoder to create your code?
Also, if you only have one statement inside of an If statement, you can remove the Then and End, like this:

Code:
```If X=1 Then X+1->x End can become: If X=1 X+1->X```
Just a quick question:

Style-wise, is it better to use a colon or a newline for a one line if statement?
For example,

Code:
``` If X=1:X+1->X vs If X=1 X+1->X ```
MateoConLechuga wrote:
Nice work on getting started with TI-BASIC! So far it looks like you are getting the hang of things. Here's some small suggestions:

You can use the evalution of an If statement in an expression, like so:

Code:
```   If 60<=X and X<=69    Then       1+G->G    End === is the same as === G+(0<X and X<=59)->G```

You can use the Pause command with a string:

Code:
`Pause "Press ENTER"`

Anyway, looks pretty neat so far; are you using SourceCoder to create your code?

Yes I'm using SourceCoder
commandblockguy wrote:
Also, if you only have one statement inside of an If statement, you can remove the Then and End, like this:

Code:
```If X=1 Then X+1->x End can become: If X=1 X+1->X```

Thanks!
Michael0x18 wrote:
Just a quick question:

Style-wise, is it better to use a colon or a newline for a one line if statement?
For example,

Code:
``` If X=1:X+1->X vs If X=1 X+1->X ```

I think it would look better with a new line.

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» All times are GMT - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum