Total Questions : 40
Expected Time : 40 Minutes

1. What is the purpose of the 'throw' and 'catch' keywords in Ruby?

2. Which operator is used to concatenate two strings in Ruby?

3. Which of the following is NOT a valid way to define a variable in Ruby?

4. Which method is used to remove the last element from an array in Ruby?

5. In Ruby, what does 'attr_accessor' do?

6. In Ruby, what is the purpose of the 'next' keyword within a loop?

7. What is the Ruby convention for naming classes?

8. What is the purpose of the 'case' statement in Ruby?

9. Which Ruby operator is used to check if two values are equal in both value and data type?

10. In Ruby, what symbol is used to define a comment that spans multiple lines?

11. What is Ruby primarily known for?

12. What is the symbol used to represent the current object in Ruby?

13. What is the purpose of the 'begin' and 'rescue' keywords in Ruby?

14. What is the purpose of the 'attr_accessor' keyword in Ruby?

15. What is the purpose of the 'unless' keyword in Ruby?

16. Which of the following is a valid way to define a variable in Ruby?

17. What does the 'nil' value represent in Ruby?

18. What does the 'attr_reader' method do in Ruby?

19. What is the Ruby operator for exponentiation?

20. What is the primary use of the 'puts' method in Ruby?

21. What is the purpose of the 'map' method in Ruby?

22. What is the purpose of the 'retry' keyword in Ruby?

23. What does the 'super' keyword do in Ruby?

24. What is the Ruby convention for naming variables?

25. What is the symbol used to define a class variable in Ruby?

26. What is the purpose of the 'tap' method in Ruby?

27. What is the purpose of Ruby's 'yield' keyword?

28. In Ruby, what is the purpose of the 'require' keyword?

29. Which operator is used for concatenating strings in Ruby?

30. In Ruby, what is a 'block'?

31. In Ruby, what is a lambda?

32. Which Ruby data structure is similar to an array but allows you to associate values with keys?

33. What is the result of 5 + 3 in Ruby?

34. What is the purpose of the '__FILE__' constant in Ruby?

35. Which Ruby data structure is similar to an array but can contain only unique values?

36. In Ruby, what does 'self.included(base)' method indicate in a module?

37. Which keyword is used to define a conditional statement in Ruby?

38. In Ruby, what is the purpose of the 'super' keyword in a subclass?

39. What is a Ruby symbol?

40. Which method is used to convert a string to uppercase in Ruby?