first_name,Last_name=gets.chomp,gets.chomp is the correct way to get the input from the user.
True
False
7 practice sets · Page 1 of 1
first_name,Last_name=gets.chomp,gets.chomp is the correct way to get the input from the user.
True
False
Why is gets not preferred instead of gets.chomp?
Gets add an extra new line while chomp removes it
Gets remove an extra new line
Chomp erases the value stored in the variable
All of the mentioned
Which sequence can be used to substitute the value of any ruby expression in a string?
#(expr)
#{expr}
#expr
None of the mentioned
For getting an input from the user which method is used?
get
gets.chomp
get-s
chomp
We use semicolon or parentheses after every print or puts statement.
True
False
Why is the library function 'puts'used for?
Prints whatever is given and print it to the screen
Prints whatever is given and insert a new(blank) line
Gets input from the user
None of the mentioned
Which of the following is not a valid library function?
Puts
Gets
Get