This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic Brain Teasers => TI-BASIC
Author Message
vanchagreen


Member


Joined: 20 Feb 2008
Posts: 136

Posted: 04 Feb 2009 09:12:43 pm    Post subject:

Right, so this challenge is to take a string(Hello World!) and remove any non-alphabetic characters from it (HelloWorld). This includes spaces. Also if you have a string whose first or last characters are non-alphabetic, they are to be removed too:
(!Hello World!) yields (HelloWorld).

My attempt was 232 (Edit 204) bytes. I doubt that anyone could make a larger version... :biggrin: Happy coding!

PS. If anyone can come with a better title, feel free.


Last edited by Guest on 05 Feb 2009 05:53:46 pm; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 05 Feb 2009 05:20:04 am    Post subject:

135 bytes.
Back to top
ticalcnoah


Member


Joined: 28 Oct 2007
Posts: 153

Posted: 05 Feb 2009 06:50:43 pm    Post subject:

I've got 97 without name.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 05 Feb 2009 07:03:01 pm    Post subject:

ticalcnoah wrote:
I've got 97 without name.
Aren't you going to include lowercase letters at all?

Last edited by Guest on 05 Feb 2009 07:18:33 pm; edited 1 time in total
Back to top
vanchagreen


Member


Joined: 20 Feb 2008
Posts: 136

Posted: 05 Feb 2009 07:41:40 pm    Post subject:

Lets just say uppercase letters only, as you can't access all the lowercase letters on the calculator.
Back to top
Zaphod Beeblebrox


Member


Joined: 02 Jul 2007
Posts: 119

Posted: 05 Feb 2009 08:37:57 pm    Post subject:

If we assume that the string is already in Str1, only uppercase letters, without name, I got 92 bytes. Assuming that the string is in answer, 97 bytes
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 05 Feb 2009 10:35:43 pm    Post subject:

Very well. Without lowercase, and with the string in Ans, I have it in 83 bytes.

But yes, all lowercase letters can become permanently accessible after running an ASM program. (More info at the top of that page.)


Last edited by Guest on 11 Jul 2010 06:27:50 pm; edited 1 time in total
Back to top
vanchagreen


Member


Joined: 20 Feb 2008
Posts: 136

Posted: 06 Feb 2009 05:27:39 pm    Post subject:

Ah sorry Weregoose. :blush: I didn't know about the ASM program.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 06 Feb 2009 09:15:37 pm    Post subject:

I've got 79 bytes with uppercase letters only, which I guess means I'd have 131 byte with lowercase letters included too. Two more bytes if you want the program to display the answer, as well as output it in Ans.

Last edited by Guest on 08 Feb 2009 03:29:24 pm; edited 1 time in total
Back to top
nitacku


Advanced Member


Joined: 23 Aug 2005
Posts: 408

Posted: 07 Feb 2009 10:45:56 am    Post subject:

So far I've only been able to arrive at a solution of 84 bytes.
There must be something I'm overlooking...

83 bytes now...
Weregoose, we must have the same solution Razz


Last edited by Guest on 07 Feb 2009 10:50:12 am; edited 1 time in total
Back to top
nitacku


Advanced Member


Joined: 23 Aug 2005
Posts: 408

Posted: 16 Feb 2009 02:11:11 am    Post subject:

Darkerline & Weregoose, I'm curious to see your solutions to this teaser.

Here's my solution:
[whiteout]For(X,1,length(Ans
If inString("ABCDEFGHIJKLMNOPQRSTUVWXYZ",sub(Ans,X,1
Ans+sub(Ans,X,1
End
sub(Ans,X,1-X+length(Ans
[/whiteout]


Last edited by Guest on 12 Jul 2010 01:17:07 am; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 16 Feb 2009 02:13:59 am    Post subject:

Down to the variable choice, that's what my program looks like.

Now, I'm very curious about DarkerLine's 79 (+52) bytes...


Last edited by Guest on 16 Feb 2009 03:04:32 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 16 Feb 2009 10:38:53 pm    Post subject:

I've typed this from memory but I'm hoping it's correct.
[whiteout]
For(I,1,length(Ans
sub(Ans+sub(Ans,1,1),2,length(Ans)-not(inString("A...Z",sub(Ans,1,1
End
[/whiteout]


Last edited by Guest on 12 Jul 2010 01:16:50 am; edited 1 time in total
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement