
Ruby
Authored by Quang Văn
Education
1st Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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?