Skip to main content
1 of 5
jacobly
  • 871
  • 4
  • 4

TI-BASIC, 11 Tasks in 728 bytes

Task 1 in 7 bytes

:2max(Ans)<sum(Ans

Input is a list in Ans.

Task 2 in 92 bytes

:Input L₁
:SortA(L₁
:min(7,1+sum(not(L₁
:{L₁(1)+sum(seq(L₁(I))₁₀^(I-8),I,2,7)),L₁(Ans)+sum(seq((I>Ans)L₁(I)₁₀^(1-I),I,2,7
:ᴇ6Ans(1+(0>min(ΔList(abs(1-Ans

Prompts for a list of digits.

Task 3 in 119 bytes

:Input Str1
:"  →Str2
:For(I,1,length(Str1
 :sub(Str1,I,1→Str3
 :inString("<>",Ans
 :If Ans:Then
  :max(0,min(L,C+2Ans-3→C
 :Else
  :C+1→C
  :L+1→L
  :sub(Str2,1,C)+Str3+sub(Str2,C+1,L-C+1→Str2
 :End
:End
:sub(Str2,2,L

Prompts for a string. Assumes C and L are either undefined or 0.

Task 4 in 35 bytes

:sum(int(2seq(inString("TLIHFE",sub(Ans,I,1))^.4,I,1,length(Ans

Input is a string in Ans.

Task 5 in 63 bytes

:Ans/2→C
:sub("A.A",1+2fPart(C),2
:For(I,0,C
 :"Alex "+Ans
 :If I≠C
  :Ans+" xelA
:End
:Ans

Input is a number in Ans.

Task 6 in 66 bytes

:𝑖^((Ans<7)(Ans-3(Ans>3
:For(Y,⁻1,1
 :Disp sum(seq((5-real(AnsX+Ans𝑖Y)-3imag(AnsX+Ans𝑖Y))₁₀^(X+1),X,⁻1,1
:End

Input is a number in Ans.

Task 7 in 36 bytes

:Input L₁
:.5
:For(I,1,dim(L₁
 :Ans+L₁(I
 :If 10=int(Ans
  :0
:End
:not(Ans

Prompts for a list of digits.

Task 8 in 29 bytes

:18fPart(sum(seq(I(sub(Ans,I,1)=" ")/6,I,1,15

Input is a string in Ans.

Task 9 in 83 bytes

:For(I,1,16,2
 :If I<8
  :Ans+sub(")}]>",inString("({[<",sub(Ans,4,1)),1
 :sub(Ans,I,1)+Ans
:End
:For(I,⁻1,1
 :Disp sub(Ans,9-8abs(I),8
:End

Input is a string in Ans.

Task 10 in 159 bytes

:1→X
:Input Str1
:2+length(Str1→L
:"X
:While 2+L>length(Ans
 :Ans+Ans→Str2
:End
:Ans→Str3
:While 1
 :"XX
 :Ans+Str1+Ans→Str1
 :For(I,1,L
  :Ans+sub("0X.",2expr(sub(Str2,I+1,1))+not(expr(sub(Ans,I,3)+sub(Str2,I,3)+sub(Str3,I,3))),1
 :End
 :Disp sub(Ans,L+3,L
 :Str2→Str3
 :Str1→Str2
 :Input Str1
:End

Uses X0. instead of .Xo respectively (sorry nothing matches). Prompts for input line by line. You have to enter two lines of Xs to see all the output, and then 2nd+Quit to quit.

Task 11 in 39 bytes

:Disp "SATOR
:Disp "AREPO
:Disp "TENET
:Disp "OPERA
:Disp "ROTAS

Task 12?

This is actually impossible in TI-BASIC. It is possible to hex edit a basic program and use certain 2-byte tokens to get all of the printable ascii characters into the source code, but that's not the issue. The problem is that there is no way to store a " character into a string in pure basic on a clean calc with no program input (the same applies to the character, but that's not printable ascii). It is possible, however, to put " into an equation outside basic, after which you can use basic to convert the equation to a string and display that string. On top of all that, there is only enough room on screen for 128 characters at a time anyway.

jacobly
  • 871
  • 4
  • 4