Good day to Everyone,
I am once again failing on one last test.
I have ensure that the output exactly matches (visually) the example given. But this is so unnecessary hard because giving an HTML example is hard to compare all the hidden spaces and white chars etc.
Really think they should stop trying to test whether we have the ability to spot hidden spaces / white characters and rather test our Python knowledge. Or the example should have been much more detailed - depicting each and every required spaces (and the number of spaces) with arrows etc.
But enough ranting from me
Who can please have a look at my code.
My attached image is a perfect match (visually) but the unit test fails.
I am thankful for your help!
Thanks… now I am googling " Are electrons faster than light?"
Rather google how many spaces should be after each line. Will improve your Python skills for sure
I vaguely remember this exercise as a “padding game”. If I remmeber correctly I added conditions whether it was the first/ last category to display and added or subtracted “padding” as needed… Hope that helps.
Edit . For me , I believe trimming extra space from the last category helped me.
Thanks solved the problem. Had to remove the \n at very end of my string:
line = line.rstrip("\n")
Congrats. Np. Sorry I couldn’t provide a more direct explanation. Just a recollection of my struggles.
Not possible. FCC are volunteers and the amount of work necessary to include every possible “false” result that “looks” right, isn’t worth the effort.
Furthermore - you cannot argue that way in a job.
If you are asked to write a specific format, you cannot add random whitespaces saying “well it looks rights” - because the result might get send to an API, a computer who evaluates it. And that thing has no idea about “look”, it just reads the symbols and if some symbols are wrong, it might break - or it makes something weird and sends the data to the next computer and then 3 computers down the line something breaks.
Good luck troubleshooting and bugfixing the code on 5 computers, potential tens of thousands of lines of code, because you didn’t feel like matching EXACTLY what you were asked to do in the first place.
Programming is not done for programmers - it’s done to tell a tiny metal rock on how to do math. Hence the test is not done so “we” can look at your result, it’s done so you can “talk” to a REALLY stupid rock.
I have no problem with producing exactly what is required. I was merely referring to the fact: I give you a hand drawing of a report. You have to guess how many spaces between my words and my writing style. If they want it to the tee then at least specify it clearly.
So in other words - if your end user requirement wants me to end a line with \n else your API will be choking then it would be very helpful if you DO mention / emphasize that to me. Else guess what - my system will not append the desired trailing \n character and you will be the one to be blamed. LoL. Get your spec right hey. Hehee. Jokes aside…
Other than that I am 1000% happy with the course and believe it is tremendously helpful.
My frustration was only with spending 100hours to find that missing \n character which is not clearly stipulated in the specification. But I understand it is volunteers and they invest tons of their time. And the quality is really great!
But I was hoping some feedback / criteria could be helpful.
Sorry if I sound mean - but what the heck are you talking about?
If I look at the readme it contains an example with EXACTLY the right amount of spaces everywhere.
You can even look into the test-module and see what it expects. And yeah, learning to read the assertion-errors can take some time.
But you have several options in the given project to figure out what to do and then you could still ask in the forum.
I know it can be frustrating at first, but that’s just part of the learning process and not the fault of the FCC team.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.