Il giorno Sat, 31 Dec 2011 03:58:15 +0900 sathish babu <sathish.babu / india.com> ha scritto: > I'm getting error like comparison of string with 50 failed That's the problem. In ruby, you can't compare a string with a number (you'll get an ArgumentError exception). First, you have to convert the string to a number, usually using String#to_i or String#to_f. > for the below code snippet.Please guide me to resolve > > > > > print(' Enter your mark :') > mark = gets() > if(mark < 50) > puts( " You passed") > else > puts(" You just scored #{mark} which is not enough to pass ") > > end > Replace mark = gets() with mark = gets().to_i and it'll work. I hope this helps Stefano