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 of classes and or functions
|x|
!=
code blocks
library
2. defines an instance variable which only exists within the object it was created in.
code blocks
.even?
.methods
@
3. method to determine if an object is an even number
.even?
.swapcase
!
$
4. a fixed value that begins with a capital letter such as Pi.
$:.
constant
operators
.each
5. tells ruby a value to pass while iterating a block of code
yield
.pop
.scan()
$:.
6. 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
?x
==
A
7. a definition of a concept in an object oriented language.
A
call
inheritance
class
8. (regular expression)any space or tab or newline or whitespace
interpolation
@@
.select
s
9. a collection of objects with a defined order
.include?()
d
array
S
10. method that tells an argument's place value within an array
^
.swapcase
#{}
.index
11. a string method that makes string all caps.
.upcase
class
.split
flow control
12. operator for "Boolean not"
!
!=
?x
variable
13. a string method that substitutes ALL occurrences of a string with another.
.gsub
.map
ARGV
class
14. data passed to methods in parenthesis after a method's name.
arguments
@
.each
|x|
15. interpolation operator
>=
.chop
.pop
#{}
16. a collection of characters such as "Hello world!"
<=
$
d
string
17. (regular expression)any nonletter or nondigit or nonunderscore.
W
.index
.between?
.scan()
18. (regular expression)any non-whitespace character
.sort
S
?x
$:.
19. defines array of multiple elements seperated by a space
%w{}
<=
operators
not and or
20. the ternary operator if?then:else
if?then:else
D
A
.next
21. an array method that
.index
.sort
|x|
.each
22. a string method that capitalizes first character
.capitalize
=>
.even?
$:.
23. an array method that
w
#{}
.each
A
24. (regular expression)any digit
d
#{}
.methods
.even?
25. 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
S
=>
start_with?
.match
26. the process of deciding which sections of code to execute based on conditions
flow control
?x
.downcase
>=
27. method that tells an argument's place value within an array
D
.index
s
.gsub
28. a string method that changes last character to next alphabetical character
.next
.each
.capitalize
%q
29. the remainder operator
%
!
class
^
30. a string method that scans object for arguments - uses regular expressions.
.scan()
$
string
.sub
31. (regular expression)anchor for the start of a string
A
d
<<
@
32. a regular method that is the anchor for the beggining of a line
^
if?then:else
%
.upcase
33. Data type that is assigned at initialization and typically does not change. Starts with a capital letter.
strip
constant
regular expressions
string
34. assigns a key to a hash value
break if
arguments
.each
=>
35. string method that determines if a string starts with a defined string
start_with?
library
s
d
36. array method that removes last item from an array
==
.pop
string
<<
37. tells you all methods that an object may invoke.
.between?
.each
|x|
.methods
38. a variable that lists the directories where Ruby will look for libraries
.sort
if?then:else
$:.
<=
39. (regular expression)any letter or digit or underscore
w
.between?
hash
.chop
40. a string method that uncapitalizes first character
.downcase
range
method
start_with?
41. used in an expression to manipulate objects
operators
.each
%q
.downcase
42. a string method that substituition. Requires 2 arguments.
.sub
.scan()
A
not and or
43. (regular expression)any non-whitespace character
%w{}
.downcase
S
%q
44. methods that step through lists element by element (like each or upto or times etc)
!
iterator
S
.index
45. (regular expression)any nondigit
.even?
D
A
.swapcase
46. Boolean not and or (lower preference)
.capitalize
not and or
.sub
ARGV
47. array method that transforms the contents of an array according to a specified set of rules
.split
parameters
^
.map
48. passes value into block of code and assigns it the label of "x"
struct
|x|
strip
object
49. a regular method that is the anchor for the beggining of a line
^
D
<
break if
50. (regular expression)any space or tab or newline or whitespace
!=
s
.gsub
.map