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. string method that determines if a string ends with a defined string
D
end_with?
code blocks
.gsub
2. tells ruby a value to pass while iterating a block of code
.upcase
yield
.gsub
!
3. (regular expression)any nondigit
s
start_with?
D
variable
4. a string method that reverses capitalization
.each
W
.swapcase
.capitalize
5. Boolean OR operator
||
.scan()
.next
.between?
6. assigns a key to a hash value
.index
=>
.select
.scan()
7. passes value into block of code and assigns it the label of "x"
<=>
S
|x|
not and or
8. a variable that lists the directories where Ruby will look for libraries
$
&&
Z
$:.
9. a regular method that is the anchor for the beggining of a line
.chop
Z
^
inheritance
10. (regular expression)any digit
.map
d
.scan()
s
11. array method that removes last item from an array
.pop
inheritance
float
if?then:else
12. array method that selects particular items from an array
operators
!=
.chop
.select
13. defines a class variable. Can be used anywhere within a class
.swapcase
.upcase
A
@@
14. passes value into block of code and assigns it the label of "x"
.sort
Z
.downcase
|x|
15. a string method that splits a string into an array
.split
integer
.next
class
16. data passed to methods in parenthesis after a method's name.
parameters
%w{}
call
W
17. (regular expression)any non-whitespace character
S
<<
.select
.each
18. array method that transforms the contents of an array according to a specified set of rules
.map
!
D
#{}
19. method that tells if an argument is within the limits of two numbers
%
==
.between?
.pop
20. a set of code within a class or object
method
w
ARGV
local variable
21. class inheritance operator.
.even?
.sub
.sub
<
22. defines an instance variable which only exists within the object it was created in.
@
<<
.between?
.next
23. a collection of objects or values with associated keys
.index
.chop
hash
.even?
24. the process of deciding which sections of code to execute based on conditions
string
.gsub
flow control
?x
25. comparison operator for "not equal to"
d
!=
.include?()
%
26. allows for classes to relate to each other in a hierarchy
start_with?
<
inheritance
.sub
27. returns ASCII value of x
?x
.split
.chop
if?then:else
28. (regular expression)anchor for the end of a string
.gsub
.methods
Z
#{}
29. a whole number
#{}
A
.each
integer
30. method that tells an argument's place value within an array
iterator
end_with?
arguments
.index
31. (regular expression)any space or tab or newline or whitespace
kernel
s
!
.select
32. (regular expression)any space or tab or newline or whitespace
%q
s
.index
.downcase
33. a string method that makes string all caps.
operators
.upcase
yield
.next
34. greater than or equal to (comparison operator)
.index
integer
>=
hash
35. operator for "Boolean not"
@@
!
.include?()
integer
36. a number with a decimal point such as 1.0 or 3.1
=>
float
.swapcase
.index
37. string method that "cleans" extra spaces from strings
strip
flow control
end_with?
string
38. a definition of a concept in an object oriented language.
struct
.match
class
$:.
39. the ternary operator if?then:else
s
w
#{}
if?then:else
40. a module that works everywhere within ruby without being refereed to. Contains many common ruby methods.
.capitalize
.sub
kernel
!
41. a module of classes and or functions
<
&&
@@
library
42. runs a proc that has been stored to a variable
call
.between?
w
.methods
43. a string method that removes last character
array
W
.sub
.chop
44. (regular expression)anchor for the start of a string
A
.between?
call
<<
45. array method that removes last item from an array
local variable
.pop
#{}
break if
46. a string method that substitutes ALL occurrences of a string with another.
strip
.gsub
iterator
.upcase
47. a regular method that is the anchor for the end of a line
d
method
$
.map
48. a string method that uncapitalizes first character
.downcase
.next
break if
<=>
49. a fixed value that begins with a capital letter such as Pi.
.between?
^
.pop
constant
50. method that tells an argument's place value within an array
d
.next
.index
$