From: Alan Schwarz Date: 2011-10-24T16:03:07+09:00 Subject: Re: ASCII character help! On 10/23/11 10:23 PM, Ray DarkScythe wrote: > > 1.Re-arrange these characters in ASCIIbetical order: 2, u, A, 4, w, f, > R, y > > here is my answer: I attach the rb file if you want to run it in command > line. > > puts "type this:" + "2" + "u"+ "A" + "4" + "w" + "f" + "R" + "y" > asci = gets.chomp.to_s > if asci =="2uA4wfRy" > else asci != "2uA4wfRy" > puts "retype this:" + "2" + "u"+ "A" + "4" + "w" + "f" + "R" + "y" > asci = gets.chomp.to_s > end until asci == "2uA4wfRy" #recycle if wrong input, I put this for fun > puts "2, 4, A, R, f, u, w, y" > > I am not really sure if this is what the question looking for? I think > it is looking for a automated ascii alphabetically (you know the math > thing). The question isn't asking you to write a program. It is only asking you to sort the characters, and you've done that already. When you learn about arrays, you'll learn about a method to sort it automatically. :-) > > 2.The ASCII table contains all the characters in the keyboard. Use irb > to find out wheter the characters "?" lies: > > 1. Before 0. #what lies he is looking for here.. I know how to use Irb > 2. After 9 but before A. > 3. After Z but before a. > 4. After z. > > .....I check the ascii table so "Before 0" is this "/" =/ this is > his number....After 9 is this ":" and before A is this "@" character, do > my understanding correct? "Lies" does not mean deception or falsehood here; "lies" means "is located". It is asking where the "?" is located in the ASCII table. Try running "?" < "0" on irb and let your truth value be your guide.