+ 3
[SOLVED] Why this doesn't generate a string as expected?
I'm trying to generate a encryption key as mentioned in thr CryptoCube challenge, but the output isn't as expected instead it generates a very long integer. Can someone help me figure what I'm doing wrong? I'm trying to generate something like this, 0:U:U:L:R,1:U,2:D:R,3:U:R https://code.sololearn.com/czbsZdG1Y9Zc/?ref=app https://www.sololearn.com/learn/9884/?ref=app
3 Respuestas
+ 6
Line 25 is adding your 2 characters ':' and the map one together. Change ':' to ":" and you will get string concatenation.
+ 6
Always use double quotes on characters to make them a string of one character, if you are using them in strings.
+ 2
Thank you Mr. John Wells, I didn't know that would've been the problem.