This forum is now read-only. Please use our new forums at discuss.codecademy.com.

722 points
51666fcb13cefdf1ea002816_889210347
Submitted by
Nicole Pank
about 6 years ago

This looks right but isn't passing.

"Oops, try again! It looks like your @age instance variable isn't set equal to the age parameter passed to your initialize method."

class Person
  def initialize(name, profession, age)
    @name = name
    @profession = profession
    @age = age
  end
end

5 votes

permalink

Try switching the order of the arguments 'age' and 'profession' after 'initialize.' The way they check for correctness is sometimes buggy, it might just be expecting you to list 'age' first.

That is the only difference between your code and mine.

932 points
5185dd9925ac40ec3f002ab3_993502926
Submitted by
Rainbough Phillips
about 6 years ago

4 Comments

51666fcb13cefdf1ea002816_889210347 Nicole Pank about 6 years ago

That was it, thank you!

Picture Cristi Sturgill almost 6 years ago

class Person
def initialize(name, age, profession)
@name = name
@age = age
@profession = profession
end
end

B1ca42958e5f764daa30e4676019bdb0?s=140&d=retro fdre3wsd almost 6 years ago

name, age, profession seems to be the order

533b22568c1ccc6c0d00409e_910858883 Sofia Perwallius over 5 years ago

Tnx a bunch:)