Ruby - Error Handling
Find the error in this Ruby code:
begin puts 10 / 2 rescue ZeroDivisionError puts "Error"
begin puts 10 / 2 rescue ZeroDivisionError puts "Error"
begin block is not closed with end, causing syntax error.puts syntax are correct; division is safe here.end keyword to close the block -> Option C15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions