0

Case block always executing else statement

I am trying to solve this code challenge by solo learn, given an input map it to matching criteria but for some reason the console input isnt being processed by my function. link to my code: https://code.sololearn.com/c8B7NX2wGuPp

24th Dec 2019, 8:24 PM
Shafay Haseeb
Shafay Haseeb - avatar
9 odpowiedzi
+ 1
You have to use: input = gets.to_i To get a integer
24th Dec 2019, 9:43 PM
Coding Cat
Coding Cat - avatar
+ 1
Case 1 must be: 0...5
24th Dec 2019, 10:05 PM
Coding Cat
Coding Cat - avatar
+ 1
Output Format: 'I got this!' 'Help me Batman' 'Good Luck out there!'
24th Dec 2019, 10:11 PM
Coding Cat
Coding Cat - avatar
0
Does the job but fails 3 other test cases, for which I don't know the values 😎
24th Dec 2019, 9:56 PM
Shafay Haseeb
Shafay Haseeb - avatar
24th Dec 2019, 9:57 PM
Shafay Haseeb
Shafay Haseeb - avatar
0
Thank you almost forgot about it, there are still 2 cases failing. I'll check my conditions again!
24th Dec 2019, 10:07 PM
Shafay Haseeb
Shafay Haseeb - avatar
0
Check the spelling of the output
24th Dec 2019, 10:08 PM
Coding Cat
Coding Cat - avatar
0
Perfect!
24th Dec 2019, 10:18 PM
Shafay Haseeb
Shafay Haseeb - avatar
0
👍
24th Dec 2019, 10:19 PM
Coding Cat
Coding Cat - avatar