x = ''Y'' puts ''x'' [output: y] But Why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

x = ''Y'' puts ''x'' [output: y] But Why?

# okay let's do this x = ''Y'' puts ''x'' # output: y(wrong because supposed to be capitalized.) {Why Is The Output y?}

24th Mar 2019, 12:46 AM
seth eslami
seth eslami - avatar
2 Answers
+ 4
seth eslami You are confused about basic stuff. Complete the ruby course and keep on experimenting you should do fine. About your code: # assign character "Y" to variable x x = "Y" # print character "x" puts "x" In the last line you probably wanted to print variable x x and "x" are different things # This is what you wanted to do. puts x
24th Mar 2019, 1:08 AM
Lord Krishna
Lord Krishna - avatar
output is supposed to have capitals like in the input, but it shows wrong on output.
24th Mar 2019, 12:47 AM
seth eslami
seth eslami - avatar