Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What is the output of the given code?
if 79>78
puts “True”.upcase
if 9>8
puts “True”.Upcase
if 7==7
puts “equal”.downcase
end
end
end

What is the output of the given code?
if 79>78
puts “True”.upcase
if 9>8
puts “True”.Upcase
if 7==7
puts “equal”.downcase
end
end
end
a) True
b) Error
c) True,error
d) TRUE
Undefined method `Upcase’ for String

Answer: d
Explanation: Method should always be in smallcase.
Output:
TRUE
Undefined method `Upcase’ for String

Join The Discussion