------ art_39463_16424124.1219326434986 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Aug 20, 2008 at 7:27 PM, Daniel Kindler <gizabo / yahoo.com> wrote: > okay, so in the book im reading it wanted me to do 2 things > > > > 1) wanted me to make a method for sorting a list of words > > this is what i got now > > def arange > arr ] > puts arr.sort.join(', ') > word ets.chomp > while word ! " > arr << word > word ets.chomp > end > end > > arange > > why isnt it working? > > Daniel, I am not sure if your comment: "that was helpful" was meant to be sarcastic or if you really found the link helpful. However, if you if you still needs help, see below: I am no Ruby expert but I re-arranged your code and it works: def arange arr ] word ets.chomp while word ! " arr << word word ets.chomp end puts arr.sort.join(', ') end arange ruby mypgm.rb orange banana Apple Banana Cherries mango Apple, Banana, Cherries, banana, mango, orange > > > > 2) It wants me to make and "old school roman numerals" thing > > so if i put a number it, it would return it in roman numerals, but NOT > subtraction > so like 4 would be IIII , not IV > > > IM CONFUSED WITH THAT!!! any body can give me a little hint on how to > start? > thx > -- > Posted via http://www.ruby-forum.com/. > > For your second question I also find it confusing. But you can find many examples on the web, *google*, about playing with roman numerals. ------ art_39463_16424124.1219326434986--