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?}

24th Mar 2019, 12:46 AM
seth eslami
seth eslami - avatar
2 Antworten
+ 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
0
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