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 module that works everywhere within ruby without being refereed to. Contains many common ruby methods.
.gsub
.sub
kernel
D
2. array method that transforms the contents of an array according to a specified set of rules
object orientation
%q
kernel
.map
3. defines array of multiple elements seperated by a space
%w{}
.include?()
D
.sub
4. interpolation operator
#{}
.sub
.swapcase
<<
5. a string method that splits a string into an array
struct
#{}
<<
.split
6. sets a single character text delimiter for multi-line strings
w
.between?
start_with?
%q
7. comparison operator for "not equal to"
<<
@@
!=
end_with?
8. (regular expression)any letter or digit or underscore
&&
not and or
w
<=
9. string method that determines if a string starts with a defined string
start_with?
$
operators
float
10. array method that transforms the contents of an array according to a specified set of rules
Z
?x
.include?()
.map
11. pushes a new item onto the end of an array.
&&
<<
@
kernel
12. method that tells an argument's place value within an array
.index
constant
D
>=
13. 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
.map
==
d
14. (regular expression)any nondigit
D
#{}
end_with?
.methods
15. an array method that
.downcase
Z
.each
<<
16. method that tells an argument's place value within an array
if?then:else
.index
w
.even?
17. a string method that substitutes ALL occurrences of a string with another.
.gsub
range
@@
.upcase
18. passes value into block of code and assigns it the label of "x"
|x|
$
float
.match
19. (regular expression)any digit
d
array
.upcase
.gsub
20. (regular expression)any digit
kernel
?x
d
W
21. method to determine if an object is an even number
.even?
$
#{}
integer
22. Boolean not and or (lower preference)
.even?
@
not and or
d
23. tells you all methods that an object may invoke.
||
constant
.methods
.next
24. a fixed value that begins with a capital letter such as Pi.
.sub
constant
!=
.next
25. a string method that reverses capitalization
.swapcase
A
iterator
?x
26. the ternary operator if?then:else
A
if?then:else
s
s
27. Data type that is assigned at initialization and typically does not change. Starts with a capital letter.
%
object orientation
constant
s
28. a set of code within a class or object
constant
method
struct
w
29. a regular method that is the anchor for the end of a line
$
W
=>
.map
30. (regular expression)any space or tab or newline or whitespace
hash
s
.downcase
%w{}
31. a definition of a concept in an object oriented language.
.swapcase
class
call
string
32. defines a class variable. Can be used anywhere within a class
.chop
@@
.split
strip
33. runs a proc that has been stored to a variable
break if
|x|
call
.chop
34. a string method that removes last character
method
^
w
.chop
35. array assignment oprator
||
.scan()
.map
<<
36. allows for classes to relate to each other in a hierarchy
w
break if
inheritance
W
37. a single instance of a class.
object
.methods
.methods
regular expressions
38. a string method that uncapitalizes first character
string
not and or
!=
.downcase
39. a string method (with /REGEX/ and starting_point separated by comma) that outputs the first string matching the defined regular expression from an optionally defined starting point
parameters
.match
$:.
method
40. method that sorts items alphabetically
.sort
@@
class
end_with?
41. conditionally stops a loop
break if
ARGV
!=
!=
42. comparison operator for "not equal to"
!=
%w{}
w
.chop
43. (regular expression)any nonletter or nondigit or nonunderscore.
%q
s
W
?x
44. a definition of a concept in an object oriented language.
!=
class
constant
.methods
45. a variable that lists the directories where Ruby will look for libraries
$:.
&&
.swapcase
=>
46. a string method that capitalizes first character
%w{}
.capitalize
%
.upcase
47. a collection of characters such as "Hello world!"
==
local variable
string
<<
48. (regular expression)any non-whitespace character
arguments
%w{}
<
S
49. sets a text delimiter
.map
W
%arg
strip
50. a special class that holds attributes and data but no methods.
w
method
break if
struct