<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/ruby-beginner-en-32cN3/0/4?curriculum_id=5059f8619189a5000201fbcb#
<In what way does your code behave incorrectly? Include ALL error messages.>
the relevant part of this code is the display_balance method, but i ve included the code in its entirety. It is exactly the same as in the original code in part one as far as i see but doesnt work and gives the following error.
puts pin_number==pin? "Balance: $#{@balance}.": pin_error
^
(ruby):19: syntax error, unexpected ‘:’, expecting keyword_end
puts pin_number==pin? “Balance: $#{@balance}.”: pin_error
class Account
attr_reader :name
attr_reader :balance
def initialize(name, balance=100)
@name = name
@balance = balance
end
private
def pin
@pin = 1234
end
def pin_error
"Access denied: incorrect PIN."
end
public
def display_balance(pin_number)
puts pin_number==pin? "Balance: $#{@balance}." : pin_error
end
end
<do not remove the three backticks above>