0
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?}
2 odpowiedzi
+ 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
0
output is supposed to have capitals like in the input, but it shows wrong on output.