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. an array method that
string
constant
class
.each
2. a string method that scans object for arguments - uses regular expressions.
.sub
.scan()
range
<=>
3. a definition of a concept in an object oriented language.
.gsub
range
D
class
4. a collection of characters such as "Hello world!"
=>
.chop
string
%w{}
5. a whole number
<<
W
integer
range
6. array method that removes last item from an array
interpolation
.pop
.methods
@@
7. a collection of objects or values with associated keys
hash
start_with?
.chop
s
8. a special array made from arguments that were added to the command line at start up.
|x|
.chop
ARGV
!
9. pushes a new item onto the end of an array.
.chop
ARGV
.map
<<
10. a string method that changes last character to next alphabetical character
s
code blocks
.next
<<
11. Boolean AND operator
&&
@
arguments
constant
12. the ternary operator if?then:else
if?then:else
.methods
code blocks
.sub
13. a string method that makes string all caps.
.upcase
d
parameters
.next
14. a string method that capitalizes first character
<
.capitalize
%q
array
15. (regular expression)any digit
d
hash
.split
call
16. (regular expression)any space or tab or newline or whitespace
s
.gsub
start_with?
inheritance
17. methods that step through lists element by element (like each or upto or times etc)
D
<
iterator
operators
18. array assignment oprator
<<
string
D
.chop
19. method to determine if an object is an even number
=>
.swapcase
s
.even?
20. a string method that substitutes ALL occurrences of a string with another.
.gsub
string
.each
.scan()
21. (regular expression)anchor for the end of a string
Z
.pop
d
.map
22. tells ruby a value to pass while iterating a block of code
not and or
S
yield
parameters
23. (regular expression)any letter or digit or underscore
.downcase
method
object
w
24. (regular expression)anchor for the start of a string
.next
A
.pop
.include?()
25. Boolean not and or (lower preference)
.sort
not and or
.gsub
.map
26. allows for classes to relate to each other in a hierarchy
inheritance
<<
|x|
string
27. a string method that splits a string into an array
S
#{}
kernel
.split
28. method that tells if an argument is within the limits of two numbers
w
^
.between?
.include?()
29. array method that transforms the contents of an array according to a specified set of rules
object
.map
.index
start_with?
30. a special class that holds attributes and data but no methods.
integer
operators
<=>
struct
31. the representation of data from a start to end point
#{}
start_with?
.include?()
range
32. data passed to methods in parenthesis after a method's name.
.sub
range
code blocks
parameters
33. a string method that substituition. Requires 2 arguments.
.index
.sub
!
$
34. the remainder operator
regular expressions
.include?()
%
||
35. sets a text delimiter
.downcase
.chop
%arg
.even?
36. (regular expression)any nonletter or nondigit or nonunderscore.
S
D
S
W
37. method that tells an argument's place value within an array
.index
<=
if?then:else
not and or
38. comparison operator for "equal to"
<<
ARGV
==
.between?
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
.capitalize
.match
ARGV
.capitalize
40. returns ASCII value of x
if?then:else
?x
call
.even?
41. a string method that capitalizes first character
library
|x|
constant
.capitalize
42. a fixed value that begins with a capital letter such as Pi.
end_with?
w
constant
.each
43. a string method that substitutes ALL occurrences of a string with another.
if?then:else
.methods
.gsub
%
44. used in an expression to manipulate objects
.next
operators
parameters
constant
45. runs a proc that has been stored to a variable
|x|
?x
range
call
46. variable that can be used only where it is defined within an application
local variable
class
start_with?
D
47. a placeholder for a single object that may be a number or string or list or instance of a defined class
class
|x|
variable
s
48. array method that selects particular items from an array
.select
.index
A
float
49. a string method that reverses capitalization
if?then:else
.select
method
.swapcase
50. a collection of objects with a defined order
start_with?
library
.include?()
array