
Ruby
Quiz
•
Education
•
1st Grade
•
Practice Problem
•
Hard
Quang Văn
Used 1+ times
FREE Resource
Enhance your content in a minute
80 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which variable name is valid in Ruby? (Choose one.)
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Given the following:
MSG = "hello"
MSG.upcase!
p MSG
What is the correct result? (Choose one.)
An error occurs because MSG is a constant.
HELLO is displayed without warning.
A warning apears because MSG is a constant but HELLO is displayed
hello is displayed since MSG is a constant.
3.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Which of the following statements are true? (Choose two.):
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Choose one suitable name for the class variable.
5.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Select all correct variable names in Ruby
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Given the following:
MSG = "hello"
MSG = MSG.upcase
p MSG
What is the correct result? (Choose one.)
An error occurs because MSG is a constant.
HELLO is displayed without warning.
A warning apears because MSG is a constant but HELLO is displayed
hello is displayed since MSG is a constant.
7.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Which of the following can be inserted into __(1)__ in order to generate the output below? (Choose two.)
$code = "CODE"
__(1)__
puts "i like writing #{$code}"
puts "i like writing #$code"
puts 'i like writing #{$code}'
puts 'i like writing #$code'
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
