0
How to solve Ballpark Orders
I can’t even manage to get an output. I’ve tried to use a method and that also doesn’t work. https://code.sololearn.com/cXsp2kVHbvTf/?ref=app
3 Respuestas
+ 1
Aleysha Read problem again. String containing 4 words with separated by space. So you need to split String into list. Iterate the list and compare the String using eql? function and get the total amount. Finally apply tax on that amount and add this tax in total amount to get result.
0
AJ Anant I’m about halfway through the ruby tutorial, I havent even heard of the eql? function yet. I thought I may have been doing something I already knew incorrecly, Do you think you’d need more than beginner knowledge to solve this?
0
Aleysha Yes if you are going to solve these type of problem then you need to know more than the beginner but Ruby is easy language than other languages like Java , C#, C , C++ etc. You need to know about functions, how to implement them, where to implement.
eql? used to compare 2 String. So in this problem you can't compare with == because it's compare object not value. You can check like this
a.eql?(b) it will return either true or false.