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 regular method that is the anchor for the end of a line
S
<<
$
.split
2. allows for classes to relate to each other in a hierarchy
%q
S
inheritance
.sub
3. a string method that substituition. Requires 2 arguments.
<<
.gsub
.sub
.pop
4. a placeholder for a single object that may be a number or string or list or instance of a defined class
.sub
class
.each
variable
5. defines an instance variable which only exists within the object it was created in.
.pop
operators
@
D
6. using classes and objects to make real-world concepts in programming.
object orientation
<
||
.map
7. (regular expression)any digit
.map
operators
d
s
8. Data type that is assigned at initialization and typically does not change. Starts with a capital letter.
.scan()
break if
constant
|x|
9. 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
.each
.match
d
.index
10. (regular expression)any nonletter or nondigit or nonunderscore.
W
hash
yield
string
11. a string method that removes last character
flow control
float
operators
.chop
12. comparison operator for "equal to"
==
.downcase
|x|
class
13. a string method that capitalizes first character
.capitalize
.even?
.split
>=
14. a module that works everywhere within ruby without being refereed to. Contains many common ruby methods.
s
S
kernel
^
15. returns ASCII value of x
library
?x
arguments
.even?
16. methods that step through lists element by element (like each or upto or times etc)
@
.sub
=>
iterator
17. an array method that returns TRUE or FALSE if the array contains specified item
object orientation
.include?()
.gsub
yield
18. runs a proc that has been stored to a variable
arguments
.methods
call
object orientation
19. tells ruby a value to pass while iterating a block of code
.sub
$
start_with?
yield
20. interpolation operator
.methods
inheritance
#{}
struct
21. a string method that uncapitalizes first character
.downcase
library
.between?
range
22. (regular expression)any nondigit
D
.split
.downcase
.include?()
23. a set of code within a class or object
not and or
.split
method
$:.
24. a module of classes and or functions
Z
call
<<
library
25. assigns a key to a hash value
constant
=>
<<
<<
26. operator for "Boolean not"
operators
start_with?
A
!
27. a collection of objects with a defined order
array
#{}
kernel
<=
28. (regular expression)any digit
w
d
s
.map
29. (regular expression)anchor for the end of a string
.methods
.split
Z
|x|
30. string method that "cleans" extra spaces from strings
.each
W
.next
strip
31. a string method that reverses capitalization
.swapcase
$:.
.between?
.sort
32. a special array made from arguments that were added to the command line at start up.
ARGV
W
$
object
33. a regular method that is the anchor for the beggining of a line
>=
parameters
^
%
34. (regular expression)any space or tab or newline or whitespace
inheritance
start_with?
s
.scan()
35. Boolean OR operator
||
.methods
constant
d
36. method that sorts items alphabetically
.sort
.gsub
.gsub
.sub
37. array method that transforms the contents of an array according to a specified set of rules
^
=>
constant
.map
38. comparison operator for "not equal to"
.next
regular expressions
.include?()
!=
39. (regular expression)any letter or digit or underscore
strip
|x|
w
#{}
40. (regular expression)anchor for the end of a string
.methods
Z
.gsub
.map
41. the process of deciding which sections of code to execute based on conditions
.between?
%q
flow control
!=
42. a number with a decimal point such as 1.0 or 3.1
S
float
.even?
$:.
43. a variable that lists the directories where Ruby will look for libraries
.sub
#{}
$:.
.scan()
44. string method that determines if a string ends with a defined string
D
.chop
class
end_with?
45. tells you all methods that an object may invoke.
.include?()
.chop
strip
.methods
46. symbol for a global variable which can be called from anywhere in an application.
.capitalize
.chop
$
A
47. an array method that
method
string
.each
.match
48. Boolean AND operator
&&
w
|x|
.sub
49. the ternary operator if?then:else
if?then:else
method
||
interpolation
50. conditionally stops a loop
start_with?
<<
break if
.include?()