Welcome to Dream.In.Code
Become an Expert!

Join 149,485 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,357 people online right now. Registration is fast and FREE... Join Now!




problems with scheme (Drscheme)

 
Reply to this topicStart new topic

problems with scheme (Drscheme), a google-like search engine

UNIBALL
27 Apr, 2007 - 01:16 AM
Post #1

New D.I.C Head
*

Joined: 27 Apr, 2007
Posts: 1


My Contributions
hi all

im a new Scheme user and i have some problems when practicing on the following questions:

QUOTE
1. convert strings to word, for example
(string-the-word " Hello, everyone. I need your help!")
and should return
(list "Hello" "everyone" "I" "need" "your" "help")


where string-the-word recognizes a character string as its argument then returns a list of the words entered in the string.

also i have played around with string->list, string-append, and char-alphabetic? , but couldn't figure it out

________________________________________________

2. then i was writing some codes that compare the match words from two lists then return the the result in percentage of matches
(I used quotient for this)

for example,
QUOTE
(matches? (list "Hello" "Everyone") (list "Hello" "Everyone" "My" "Name" "is" "Drscheme"))


should return 33 (%)
where
(quotient (* 2 100) 6) = 33
the 2 stands for the number of word that matches to the list
and 6 is the total number of the word in the list

but i really have no idea how to do the rest...like how to join them together

can someone please help me with this
thanks very much!
User is offlineProfile CardPM
+Quote Post

gregoryH
RE: Problems With Scheme (Drscheme)
1 May, 2007 - 04:13 AM
Post #2

D.I.C Regular
Group Icon

Joined: 4 Oct, 2006
Posts: 417


Dream Kudos: 50
My Contributions
QUOTE(UNIBALL @ 27 Apr, 2007 - 02:16 AM) *

hi all

im a new Scheme user and i have some problems when practicing on the following questions:

QUOTE
1. convert strings to word, for example
(string-the-word " Hello, everyone. I need your help!")
and should return
(list "Hello" "everyone" "I" "need" "your" "help")


where string-the-word recognizes a character string as its argument then returns a list of the words entered in the string.

also i have played around with string->list, string-append, and char-alphabetic? , but couldn't figure it out

________________________________________________

2. then i was writing some codes that compare the match words from two lists then return the the result in percentage of matches
(I used quotient for this)

for example,
QUOTE
(matches? (list "Hello" "Everyone") (list "Hello" "Everyone" "My" "Name" "is" "Drscheme"))


should return 33 (%)
where
(quotient (* 2 100) 6) = 33
the 2 stands for the number of word that matches to the list
and 6 is the total number of the word in the list

but i really have no idea how to do the rest...like how to join them together

can someone please help me with this
thanks very much!

Hi

Just a gentle reminder that you should post your code to show good faith and compliance with this sites rules.

once you do this, we will help you.

regards


Greg
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 04:45PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month