4. Displaying the Balance

Uploading… For some reason my code passed in the lesson but I got a weird error message. Can someone please look at the screenshot for my code and error message and let me know what I did wrong?

Also, I don’t understand this part of the lesson:

puts pin_number == pin?
“Balance: $#{@balance}.”

Why is the code above written that way?

A quarter of a MB is what this post cost a data plan user. And for what? It is by far cheaper to have raw code that we can test immediately, or examine in the flesh. A picture only costs lots of dollars for many users.


I’m sorry, I didn’t realize that or think it was a problem since we have the option to add images/screenshots. I thought it would be an easier visual for someone to help me figure out why the error was occurring. But I will consider providing raw code if that is easier for those who are giving me useful feedback on my code as I want to make their job as easy as possible. However in terms of cost, it is my understanding that CodeAcademy has a flat rate monthly charge for their pro users. If CodeAcademy wants to save money and save the user money, then maybe they would consider disabling the option to add images if that is going to create cost issues for their users. Because newbies like me aren’t going to recognize that issue, especially if they are visual learners and prefer images.
Do you work for CodeAcademy as an employee or volunteer? Or are you a paying subscriber? Maybe you can put that ticket or request in with the development team, because I could be wrong about the flat rate paid subscription price for pro users.

1 Like

Far be it for me to enter into a debate about images and their value. Like words, though, they gain in value when well chosen, and diminish when not. Raw code is still the best thing to give, even if alongside the image. That way it does get the testing that yields a correct answer or insight. Everything can work together, if the pieces are in place.

As for Codecademy creating roadblocks on images, I rather doubt that would ever happen. They have no reason to weigh in on how their users make use of the available bandwidth in their data plans, or concern over what it costs. The user is to bear there, and nobody else.

What might be useful would be for other users to know that an image awaits, not code that is cheap on bandwidth.


A further bandwidth friendly option would be to offer the screenshot as an option with a link or button. If the code is present, the image might not be needed for the solution to be spotted. The user still has an out. This is a really favorable scenario and one worth considering.

Where I live internet is considered a human right and a sizeable part of the cost is payed with tax so most everyone is able to use as much data as they care to. That’s not the story everywhere though.

I think @mtf means that there are several reasons to share code as text, and that any one of them is sufficient to prefer text over a screenshot.

That error message in the console is saying quite a lot, how do you normally use else? And what have you done with else in your code? The console error also gives quite a lot of traction for a google search.

You probably crashed the submission test which… causes them to congratulate you on your success. Brilliant, isn’t it… But you should be confirming your code’s functionality for yourself anyhow, always.

I refuse to guilt anyone into doing one thing or another, nor compel them for one reason or another. But, I may state those considerations. Let the users follow their own paths. My experience here is that posts that are code sample formatted get immediate attention. Hands down, that is the fastest way to get help.


It is almost sad to add that so many posts are formatted by moderators.

We’d be happy to help.

Please look at the links below to learn how to properly paste your code and read about our guidelines.

1 Like

Thank you @mtf. I’m sorry I didn’t mean to sound like I was debating you. I was just trying to explain my thought process. I’m very new to this and still trying to absorb all this information. Like @ionatan mentioned, I did not realize people from different locations didn’t have the same structure to pay for internet. Now what you are saying about data makes sense to me. That is an eye opener. I do appreciate your feedback :smile:


Thank you @ionatan. I didn’t realize people pay for internet so differently. For me it is just a flat rate. I will definitely keep that in mind from now on.

I didn’t think to take the error message and google it, which sounds silly to me now. That is another option I will use in the future, rather than only reading the CodeAcademy forums.

Lol, I didn’t know I could crash a submission test. :stuck_out_tongue:

I appreciate your input and help.

1 Like

Thank you for the links. I’ve already read the community guidelines but I didn’t see the link about how to post in the forum. That was really useful.


Hey, congrats on being humble bro. I rarely read people this patient on forums. Kudos!


Thank you @elias17. I’m actually a sis…:wink:.


2 posts were split to a new topic: Else without rescue is useless