Vidyalelo
Ruby Programming · Q89

Basic Syntax in Ruby

Programming · Ruby Programming · question 89

Q89

What is the output of the code? print "What's your first name?" first_name=gets.chomp a=first_name.capitalize first_name.capitalize! print "What's your last name?" last_name=gets.chomp b=last_name.capitalize last_name.capitalize! puts "My name is #first_name #last_name"

A.
Amil Jones
B.
What's your first name? amil
What's your last name? jones
My name is Amil Jones
Answer
C.
My name is Amil Jones
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board