Skip to main content
added 165 characters in body
Source Link
MarcMush
  • 6.9k
  • 15
  • 18

TI-Basic (TI-84), 1111 10 bytes

WhileRepeat startTmr=startTmrcheckTmr(startTmr Disp 1 End 

the program can only end when the check startTmr=startTmrcheckTmr(startTmr happens between two seconds (the second checkTmr(startTmr) = 1 will be greater than the first oneinstead of 0). This way, any number of ones is possible (the shortest I got was 53 ones, the longest printed during approx 10 seconds)

Repeat always executes the loop the first time, so the empty string is not included (repeat until or do while not)

For calculators without time (TI-83), replace startTmr=startTmrcheckTmr(startTmr with rand>.19 (-1 byte) but but it's not true randomness (same output on each reset of the calculator)

TI-Basic (TI-84), 11 bytes

While startTmr=startTmr Disp 1 End 

the program can only end when the check startTmr=startTmr happens between two seconds (the second startTmr will be greater than the first one). This way, any number of ones is possible (the shortest I got was 5 ones, the longest printed during approx 10 seconds)

For calculators without time (TI-83), replace startTmr=startTmr with rand>.1 (-1 byte) but it's not true randomness

TI-Basic (TI-84), 11 10 bytes

Repeat checkTmr(startTmr Disp 1 End 

the program can only end when the check checkTmr(startTmr happens between two seconds (checkTmr(startTmr) = 1 instead of 0). This way, any number of ones is possible (the shortest I got was 3 ones, the longest printed during approx 10 seconds)

Repeat always executes the loop the first time, so the empty string is not included (repeat until or do while not)

For calculators without time (TI-83), replace checkTmr(startTmr with rand>.9 but it's not true randomness (same output on each reset of the calculator)

Source Link
MarcMush
  • 6.9k
  • 15
  • 18

TI-Basic (TI-84), 11 bytes

While startTmr=startTmr Disp 1 End 

the program can only end when the check startTmr=startTmr happens between two seconds (the second startTmr will be greater than the first one). This way, any number of ones is possible (the shortest I got was 5 ones, the longest printed during approx 10 seconds)

For calculators without time (TI-83), replace startTmr=startTmr with rand>.1 (-1 byte) but it's not true randomness