Practice Makes Perfect Problems


#1



https://www.codecademy.com/courses/ruby-beginner-en-ET4bU/1/4?curriculum_id=5059f8619189a5000201fbcb#


I put in this code, but it says (ruby):13: syntax error, unexpected $end, expecting keyword_end...


def greeter (name)
    return "Oh, hello " + name + "!"
end

def by_three? (number)
    if number % 3 == 0
        return true
    else
        return false
end


#2

@netmaster50597,
Your iF statement itself should also have the END key-word
like

def func()
   if condition
     #IF code-block
   else
     #ELSE code-block 
   end
end

#3

Thanks, that worked!


#4

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