+ 1
Help me solve my problem with code
I can't understand where is the mistake, because I only novice in Ruby https://code.sololearn.com/c4xr30hmSkgf/?ref=app
3 odpowiedzi
+ 3
Change all "find == ..." for "a == ..." and either pass "car" as an argument or make it a global variable replacing all "car" for "$car".
def find(a, car):
if a == 1
...
elsif a == 2
...
elsif a == 3
...
elsif a == 4
...
elsif a == 5
...
elsif a == 6
...
else
...
end
end
find(4, car)
find(2, car)
https://www.sololearn.com/learn/Ruby/2722/
+ 3
Diego, thanks, I will try your advice in 5 min.
+ 3
It's help me, thanks a lot)