SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Ruby Programming Vocab
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. a string method that substitutes THE FIRST occurrence of a string within a string
.sub
.sort
range
.chop
2. runs a proc that has been stored to a variable
call
@@
if?then:else
.pop
3. an array method that returns TRUE or FALSE if the array contains specified item
%q
.include?()
iterator
class
4. method that tells an argument's place value within an array
.index
.downcase
<<
.include?()
5. a collection of objects with a defined order
%w{}
object orientation
array
.capitalize
6. an array method that
yield
s
.between?
.each
7. a string method that changes last character to next alphabetical character
.scan()
.scan()
.next
W
8. the remainder operator
s
!
%
.downcase
9. (regular expression)any non-whitespace character
S
local variable
.sub
hash
10. method that tells if an argument is within the limits of two numbers
%arg
|x|
ARGV
.between?
11. data passed to methods in parenthesis after a method's name.
.between?
hash
parameters
local variable
12. a regular method that is the anchor for the end of a line
.capitalize
.select
D
$
13. array method that selects particular items from an array
.between?
.upcase
.select
.even?
14. using classes and objects to make real-world concepts in programming.
object orientation
D
variable
regular expressions
15. tells ruby a value to pass while iterating a block of code
inheritance
yield
D
.match
16. (regular expression)any space or tab or newline or whitespace
Z
%
|x|
s
17. (regular expression)anchor for the start of a string
A
<=
kernel
constant
18. array method that transforms the contents of an array according to a specified set of rules
<
.chop
.map
|x|
19. operator for "Boolean not"
interpolation
?x
constant
!
20. defines array of multiple elements seperated by a space
.map
^
.map
%w{}
21. method to determine if an object is an even number
string
method
call
.even?
22. a collection of characters such as "Hello world!"
w
if?then:else
string
library
23. array method that removes last item from an array
.sub
.pop
<=
W
24. a string method that removes last character
.gsub
.chop
<=
!=
25. sets a single character text delimiter for multi-line strings
constant
|x|
%q
hash
26. a string method that substitutes ALL occurrences of a string with another.
^
.methods
.sub
.gsub
27. greater than or equal to (comparison operator)
>=
.gsub
%q
S
28. a section of code with no discrete name which is not a method by itself that can be called upon and can receive an argument.
code blocks
range
S
method
29. the ternary operator if?then:else
@@
!=
local variable
if?then:else
30. method that tells if an argument is within the limits of two numbers
constant
<<
.between?
A
31. Boolean OR operator
string
||
!=
.between?
32. returns ASCII value of x
variable
.select
.pop
?x
33. defines an instance variable which only exists within the object it was created in.
|x|
@
.methods
constant
34. symbol for a global variable which can be called from anywhere in an application.
$
%q
<=>
flow control
35. a collection of objects or values with associated keys
.include?()
@@
if?then:else
hash
36. a string method that makes string all caps.
yield
.pop
.upcase
!
37. allows for classes to relate to each other in a hierarchy
integer
regular expressions
inheritance
D
38. a string method that reverses capitalization
range
inheritance
.swapcase
%arg
39. a set of code within a class or object
method
object
parameters
>=
40. a string method that scans object for arguments - uses regular expressions.
local variable
S
integer
.scan()
41. a special array made from arguments that were added to the command line at start up.
.map
.even?
^
ARGV
42. (regular expression)any nonletter or nondigit or nonunderscore.
%arg
kernel
W
not and or
43. pushes a new item onto the end of an array.
call
<<
D
W
44. (regular expression)any digit
.select
.split
d
break if
45. assigns a key to a hash value
flow control
%q
=>
method
46. array assignment oprator
<<
D
<=
s
47. (regular expression)anchor for the start of a string
S
A
%
&&
48. a variable that lists the directories where Ruby will look for libraries
$:.
.gsub
w
yield
49. class inheritance operator.
S
if?then:else
<
.capitalize
50. conditionally stops a loop
.scan()
break if
.pop
.capitalize