✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
    • Showing results for:
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount
    • Close
  • John McBride
    PLUS
    John McBride
    Courses Plus Student 3,751 Points

    I think the answer is as below: def to_s puts "Name: " + @name + ", Balance: " + balance end

    Posted on Aug 28, 2018 by John McBride
    John McBride
    Courses Plus Student 3,751 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • Richard Wentford
    Richard Wentford
    19,730 Points

    The 'to_s' method not returning the correct string format.

    Posted on Aug 7, 2018 by Richard Wentford
    Richard Wentford
    19,730 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • Nafeez Quraishi
    Nafeez Quraishi
    12,416 Points

    Answer not being accepted

    Posted on May 19, 2018 by Nafeez Quraishi
    Nafeez Quraishi
    12,416 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    2 Answers

  • chad manning
    chad manning
    2,462 Points

    Balance method not being interpolated correctly

    Posted on Feb 28, 2018 by chad manning
    chad manning
    2,462 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • victor manda
    PLUS
    victor manda
    Courses Plus Student 2,479 Points

    Edited forgot the f after .2

    Posted on Feb 2, 2018 by victor manda
    victor manda
    Courses Plus Student 2,479 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • victor manda
    PLUS
    victor manda
    Courses Plus Student 2,479 Points

    No exact error just try again

    Posted on Feb 2, 2018 by victor manda
    victor manda
    Courses Plus Student 2,479 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • Ryan Dsouza
    Ryan Dsouza
    9,388 Points

    Unknown error in Console when i try doing this ruby exercise

    Posted on Jan 28, 2018 by Ryan Dsouza
    Ryan Dsouza
    9,388 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    2 Answers

  • David Greenstein
    David Greenstein
    6,734 Points

    Why are we able to do interpolation with balance here?

    Posted on Oct 5, 2017 by David Greenstein
    David Greenstein
    6,734 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • Mateusz Leśniak
    Mateusz Leśniak
    4,762 Points

    Can't find mistake in my code

    Posted on Mar 30, 2017 by Mateusz Leśniak
    Mateusz Leśniak
    4,762 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • John Baulig
    John Baulig
    9,180 Points

    to_s method

    Posted on May 18, 2016 by John Baulig
    John Baulig
    9,180 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    2 Answers

  • yelmi almonte
    yelmi almonte
    10,685 Points

    Help me Please Ruby Object

    Posted on Dec 4, 2015 by yelmi almonte
    yelmi almonte
    10,685 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • Jared Armes
    PLUS
    Jared Armes
    Courses Plus Student 6,391 Points

    I am so terribly stuck. I have no clue what to do here.

    Posted on Sep 3, 2015 by Jared Armes
    Jared Armes
    Courses Plus Student 6,391 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • David Besserman
    David Besserman
    3,963 Points

    I can't understand why my method isn't correctly formated

    Posted on Jul 7, 2015 by David Besserman
    David Besserman
    3,963 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • abdi ali
    abdi ali
    10,920 Points

    help

    Posted on Jun 9, 2015 by abdi ali
    abdi ali
    10,920 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    2 Answers

  • Terdema Ussery
    Terdema Ussery
    2,477 Points

    not sure what I am doing wrong

    Posted on May 15, 2015 by Terdema Ussery
    Terdema Ussery
    2,477 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    2 Answers

  • Joshua Horwitz
    Joshua Horwitz
    2,384 Points

    I'm not sure what is going wrong here, everything else has been going great but I can't get this to_s to work at all.

    Posted on May 13, 2015 by Joshua Horwitz
    Joshua Horwitz
    2,384 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • Dax Allen
    Dax Allen
    4,788 Points

    Bank Account challenge problem.

    Posted on Mar 31, 2015 by Dax Allen
    Dax Allen
    4,788 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    3 Answers

  • Ieva Salte
    Ieva Salte
    15,356 Points

    help

    Posted on Mar 13, 2015 by Ieva Salte
    Ieva Salte
    15,356 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • Kevin Miner
    PLUS
    Kevin Miner
    Courses Plus Student 2,831 Points

    Ruby Objects and Classes extra credit: using the inject method.

    Posted on Mar 5, 2015 by Kevin Miner
    Kevin Miner
    Courses Plus Student 2,831 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

  • GURUPRASAD NAGARAJAN
    GURUPRASAD NAGARAJAN
    7,853 Points

    def to_s doesn't work but does in my programme when I run in my terminal

    Posted on Jan 5, 2015 by GURUPRASAD NAGARAJAN
    GURUPRASAD NAGARAJAN
    7,853 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    3 Answers

  • Milos Rujevic
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Milos Rujevic
    Full Stack JavaScript Techdegree Student 39,661 Points

    Build a Bank Account Class def to_s "Name: #{name} , Balance: #{sprintf("%0.2f", balance)}" end

    Posted on Dec 8, 2014 by Milos Rujevic
    .a{fill-rule:evenodd;}techdegree
    Milos Rujevic
    Full Stack JavaScript Techdegree Student 39,661 Points
    • Ruby
    • Ruby Objects and Classes
    • Build a Bank Account Class
    • Printing The BankAccount

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.