Wouldn't you want to use strings as keys for this program?


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-0i8v1/0/1?curriculum_id=5059f8619189a5000201fbcb


Well this program is asking the user to input a new movie, and checks if it already exists, now what the program doesn't seem to take into consideration is movie titles with spaces, which you can not include in symbols. So how does one deal with movies with spaces in the names? I feel like using strings as the key would be better than symbols in this case. Thanks!



#2

Symbols can contain spaces. You can verify this by converting a string containing spaces to a symbol and printing the result.


#3

It specifically says in the beginning of the lesson on symbol syntax, that symbols should not contain spaces, or the program will get confused. Also when I try putting symbols with spaces in the original database, the program does not allow it.


#4

I suggested how you can disprove that.

Operative word: try
It was failing because you weren't doing it, not because it isn't possible


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.