Another logic problem
Forum » Programming Help / TI-83 Programming » Another logic problem
Started by: john masseyjohn massey
On: 1257614537|%e %b %Y, %H:%M %Z|agohover
Number of posts: 5
rss icon RSS: New posts
Another logic problem
john masseyjohn massey 1257614537|%e %b %Y, %H:%M %Z|agohover

JONL4(I) is reaction time and JONL1(I) is indexed each time there is an error. So if things are good and the child has a reaction of one second "and" does not make a error in this loop pass then the child should see VERY FAST! on line six of the graph screen . If the child has been fast but made an error then the else command should display VERY FAST WITH ERROR. When I put this bad boy, inside a working program, It blows me completely of the program. I guess it is time for the professional programmers, that is you and this amateur programmer should wait in the wings for your response!

prgmCLEAR6
If ⌊JONL4(I)=1 and ⌊JONL1(I)≠I
Then
Text(6,1,"VERY FAST!
Else
Text(6,1,"VERY FAST WITH ERROR
End

unfold Another logic problem by john masseyjohn massey, 1257614537|%e %b %Y, %H:%M %Z|agohover
Re: Another logic problem
Roy19Roy19 1257634857|%e %b %Y, %H:%M %Z|agohover

That code you posted does the following:

It will say "VERY FAST!" if ⌊JONL4(I) is 1 and ⌊JONL1(I) is not I
if ⌊JONL4(I) is not 1 or ⌊JONL1(I) is I then it wil say "VERY FAST WITH ERROR"

I have no idea what exactly checks if the child has a response of 1 second and what says if there's an error or not… But it should be this:

prgmCLEAR6
if response = 1 and answer = right
then
  Text(6,1,"VERY FAST!
else
  if response = 1
  then
    Text(6,1,"VERY FAST WITH ERROR
  End
End

or this:
prgmCLEAR6
if response = 1
then
  if answer = right
  then
    Text(6,1,"VERY FAST!
  else
    Text(6,1,"VERY FAST WITH ERROR
  End
End
unfold Re: Another logic problem by Roy19Roy19, 1257634857|%e %b %Y, %H:%M %Z|agohover
Re: Another logic problem
john masseyjohn massey 1257646253|%e %b %Y, %H:%M %Z|agohover

Thanks for your response. I am having trouble defining right. I have two definitions.
I have the value of E and each time there is an error E gets indexed. On the first pass of the loop if E=0 or If E=1 I have no problem. On the next pass I want to know if E has changed. One thought I had was to name a letter variable say "L" and set it to E on all with all passes of the loop. When the second pass of the loop occurs if L=E then there has been no error between pass one and two. Of course if L does not equal there has been an error.

The code below is my implementation of your code. JONL1(I) contains values when there are errors. But there are no errors until "I" is 5 then JONL1(I ) has not value until the fifth pass. The compiler hangs up on the forth line of the code below.I await your expertise

prgmCLEAR6
If ⌊JONL4(1)=1
then
If ⌊JONL1(I)≠I
then
Text(6,1,"VERY FAST!
else
Text(6,1,"VERY FAST WITH ERROR
End
End

john

unfold Re: Another logic problem by john masseyjohn massey, 1257646253|%e %b %Y, %H:%M %Z|agohover
Re: Another logic problem
Roy19Roy19 1257716575|%e %b %Y, %H:%M %Z|agohover

So there's an error in that code… The only possibility of an error is that I is greater than the dimension of ⌊JONL1.

unfold Re: Another logic problem by Roy19Roy19, 1257716575|%e %b %Y, %H:%M %Z|agohover
Re: Another logic problem
Timothy FosterTimothy Foster 1257738331|%e %b %Y, %H:%M %Z|agohover

Well, each thing has "VERY FAST" in common, so let's try something. Determine fastness or slowness first, then add the appropriate ending according to ∟JONL1(I).

"SLOW
If 1=∟JONL4(1
"VERY FAST
Text(6,1,Ans+sub("! WITH ERROR",1+(I=∟JONL1(I)),1+10(I=∟JONL1(I

EDIT: Optimized the code
last edited on 1257738678|%e %b %Y, %H:%M %Z|agohover by Timothy Foster + show more
unfold Re: Another logic problem by Timothy FosterTimothy Foster, 1257738331|%e %b %Y, %H:%M %Z|agohover
New post