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. assigns a key to a hash value
|x|
if?then:else
=>
|x|
2. Boolean not and or (lower preference)
@@
!
not and or
.map
3. string method that determines if a string ends with a defined string
ARGV
end_with?
.index
%
4. a string method that scans object for arguments - uses regular expressions.
.scan()
variable
.index
array
5. Boolean OR operator
@@
||
!=
.capitalize
6. tells you all methods that an object may invoke.
#{}
<=
.methods
range
7. a string method that removes last character
<
d
.chop
@
8. a string method that substitutes ALL occurrences of a string with another.
not and or
==
.gsub
.next
9. a regular method that is the anchor for the beggining of a line
kernel
.methods
|x|
^
10. comparison operator for "equal to"
local variable
interpolation
==
#{}
11. runs a proc that has been stored to a variable
|x|
call
local variable
D
12. a special class that holds attributes and data but no methods.
.match
if?then:else
struct
class
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.
>=
S
.each
code blocks
14. a definition of a concept in an object oriented language.
struct
flow control
class
!=
15. array method that removes last item from an array
$:.
.pop
struct
array
16. method to determine if an object is an even number
.even?
object orientation
@
.gsub
17. an array method that returns TRUE or FALSE if the array contains specified item
.map
constant
interpolation
.include?()
18. (regular expression)any nondigit
D
regular expressions
object orientation
call
19. comaprison operator that will read 0 if = or 1 if higher or -1 if lower.
method
not and or
.chop
<=>
20. passes value into block of code and assigns it the label of "x"
s
.sub
constant
|x|
21. (regular expression)any non-whitespace character
.sort
S
.even?
<
22. interpolation operator
.scan()
break if
.each
#{}
23. (regular expression)any space or tab or newline or whitespace
<=
s
method
hash
24. a set of code within a class or object
method
.between?
=>
<
25. a special array made from arguments that were added to the command line at start up.
@@
<<
class
ARGV
26. array method that transforms the contents of an array according to a specified set of rules
local variable
%arg
s
.map
27. an array method that returns TRUE or FALSE if the array contains specified item
$
.next
.include?()
&&
28. interpolation operator
#{}
integer
!=
$
29. the ternary operator if?then:else
object
|x|
<<
if?then:else
30. operator for "Boolean not"
!
%q
.pop
end_with?
31. a string method that substitutes THE FIRST occurrence of a string within a string
.sub
code blocks
string
.map
32. a string method that capitalizes first character
A
.capitalize
.between?
Z
33. array assignment oprator
#{}
<<
w
D
34. a string method that splits a string into an array
.split
D
.downcase
<<
35. the process of deciding which sections of code to execute based on conditions
.next
.chop
.even?
flow control
36. using classes and objects to make real-world concepts in programming.
.methods
class
object orientation
Z
37. greater than or equal to (comparison operator)
>=
.next
.select
variable
38. a string method that substitutes ALL occurrences of a string with another.
D
.gsub
$:.
?x
39. a collection of objects with a defined order
library
array
class
object orientation
40. a whole number
integer
?x
?x
operators
41. a string method that uncapitalizes first character
%arg
object
class
.downcase
42. a variable that lists the directories where Ruby will look for libraries
$:.
.capitalize
.between?
.pop
43. (regular expression)any letter or digit or underscore
.swapcase
regular expressions
w
end_with?
44. (regular expression)any non-whitespace character
array
hash
.map
S
45. (regular expression)anchor for the start of a string
ARGV
W
.between?
A
46. a collection of characters such as "Hello world!"
.pop
Z
string
%arg
47. a regular method that is the anchor for the beggining of a line
^
local variable
break if
|x|
48. operator for "Boolean not"
<<
!
yield
d
49. Data type that is assigned at initialization and typically does not change. Starts with a capital letter.
.match
!
constant
if?then:else
50. a string method that substituition. Requires 2 arguments.
d
%arg
|x|
.sub