4.Displaying the Balance


#1


class Account
  attr_reader :name, :balance
  def initialize(name, balance=100)
    @name = name
    @balance = balance
  end
  
  def display_balance(pin_number)
    puts pin_number == pin ? "Balance: $#{@balance}." : pin_error
  end
    
    private
    
    def pin(pin)
        @pin=pin
    end
    def pin_error
        puts "Acces denied: incorrect PIN."        
    end
end

I got this message error : "

Oops, try again. Did you give your display_balance a single pin_number parameter?

"

What's wrong?


#2

@yulia_gorelikova,
found with
google search
Oops, try again. Did you give your display_balance a single pin_number parameter? site:codecademy.com

https://www.codecademy.com/forum_questions/5141fdb1fdd027b9200004ef