What is the most important thing you want in a TI-BASIC program? |
Size |
|
0% |
[ 0 ] |
Speed |
|
50% |
[ 3 ] |
Usability |
|
50% |
[ 3 ] |
|
Total Votes : 6 |
|
BASIC Code wrote:
:Lbl A
:ClrHome
:Disp " WEIGHTAGE FOR:",""
:Input "QUARTER: ",A
:Input "FINAL: ",B
:If 2A+B≠100
:Then:Goto A
:Else:Goto B
:Lbl B
:Menu(" CALCULATE:","SEMESTER GRADE",1,"MINIMUM GRADE",2,"EXIT",3
:Lbl 3
:ClrHome:"
:Return
:Lbl 1
:ClrHome
:Disp "INPUT GRADE:"
:Input "QUARTER 1: ",C
:Input "QUARTER 2: ",D
:Input "FINAL EXAM: ",E
(A/100)(C+D)+(B/100)E)→θ
:Disp "","SEMESTER GRADE",θ
:Goto AA
:Lbl AA
:If 90<θ
:Then:Disp "AWESOME:A"
:Else:Goto AB
:Lbl AB
:If 80<θ
:Then:Disp "AVERAGE:B"
:Else:Goto AC
:Lbl AC
:If 70<θ
:Then:Disp "WORK:C"
:Else:Goto AD
:Lbl AD
:If 60<θ
:Then:Disp "BAD:D"
:Else:Goto AF
:Lbl AF
:Disp "HORRIBLE:F"
:Goto B
:Lbl 2
:ClrHome
:Disp "INPUT GRADES"
:Input "QUARTER 1: ",G
:Input "QUARTER 2: ",H
:Disp "WHAT PERCETAGE"
:Input "DO YOU WANT? ",Q
:If Q<0
:Then:Goto 2
:Else:Goto QQ
:Lbl QQ
:Disp "","MINIMUM GRADE"
(Q-(A/100)G-(A/100)H)/0.2)→Z
:Disp Z
:Pause
:ClrHome
:Disp "QUESTIONS ON"
:Input "FINAL: ",N
:ClrHome
:Output(1,1,"MINIMUM PERCENTAGE FOR:"
:Output(4,3,Q
(1+int(log(Q)→T
:Output(4,4+T,"PERCENT IS"
:Output(6,3,(Q/100)N
(Q/100)N→W
(1+int(log(W)→U
:Output(6,5+U,"QUESTIONS"
:Pause
:Goto B
Generated by
SourceCoder, © 2005-2010
Cemetech
Is this a beneficial program. In Lbl A I ask for the weightages. Is there a way for me to save the weightages so that the user wont have the enter them each time he/she uses the program?
You could save it to a custom list.
Code: :If 90<θ
:Then:Disp "AWESOME:A"
:Else:Goto AB
:Lbl AB
:If 80<θ
[. . .]
Umm, what? You don't, but any means, need that goto. Unless it's supposed to be a way to slow it down? For me, speed is always a great thing I look for. You could try some methods of using lists that seem to work pretty well, I'll post some code if you'd like to see an example.
_player1537 wrote:
Code: :If 90<θ
:Then:Disp "AWESOME:A"
:Else:Goto AB
:Lbl AB
:If 80<θ
[. . .]
Umm, what? You don't, but any means, need that goto. Unless it's supposed to be a way to slow it down? For me, speed is always a great thing I look for. You could try some methods of using lists that seem to work pretty well, I'll post some code if you'd like to see an example.
I tried to just say:
Code: :If A>90
:Disp "AWESOME:A"
:If B>80
:Disp "AVERAGE:B"
But this didn't work so I used Goto. How I can get rid of this? Isn't a custom list only for saving number?
Yes, but A and B are both numbers as well, so it would work. One method you could try is:
Code: SetupEditor lBENEF
6->dim(lBENEF
If lBENEF(1) != pi
Then
pi -> lBENEF
<input numbers and store them to the appropriate spots in lBENEF>
End
<continue normally after lBENEF's elements are stored in the right variables>
Just a note for the quiz: I want a balance of the three. For a game, I want an emphasis on speed. For a utility, I want the emphasis on size.
_player1537 wrote:
Yes, but A and B are both numbers as well, so it would work. One method you could try is:
Code: SetupEditor lBENEF
6->dim(lBENEF
If lBENEF(1) != pi
Then
pi -> lBENEF
<input numbers and store them to the appropriate spots in lBENEF>
End
<continue normally after lBENEF's elements are stored in the right variables>
Player I am a little confused. How do I input values and store them into the list and why is the code saying:
[/code]If If lBENEF(1) != piCode:
Why are you using factorial and pi?
rohi89 wrote:
_player1537 wrote:
Yes, but A and B are both numbers as well, so it would work. One method you could try is:
Code: SetupEditor lBENEF
6->dim(lBENEF
If lBENEF(1) != pi
Then
pi -> lBENEF
<input numbers and store them to the appropriate spots in lBENEF>
End
<continue normally after lBENEF's elements are stored in the right variables>
Player I am a little confused. How do I input values and store them into the list and why is the code saying:
Code: If lBENEF(1) != pi
Why are you using factorial and pi?
"!=" is the equivalent of the not equal (=/=) sign on the calculator. It's what you'd use in most computer programming languages. (There is no ASCII equivalent for the =/= sign.)
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.
»
Go to Registration page
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