0

What to do when all my programs work perfectly and even better than asked, with a more friendly user interface and check50 finds error in everything?

No one told you had to use exactly the same words as spoken on the quiz.

Also check50 expects a wrong answers in "mario", where, in his answer the line of "#" on the bottom, is not aligned and the direction of the pyramid is mirrored and although it should be from 0 to 23, it looks as if it considered an error to accept 0 and 1.

Thank you.

as asked, the link to the evaluation: https://cs50.me/submit50/results/rickcleansoul/d8fc1831fabca7c56667dfb88422bf06600b2b10

2

In many cases, exact spelling is required, and is found in the problem specification. How else would an automated check test your programmes?

If you think check50 does something wrong, please provide more information, like your output, what check50 complains about (maybe with the check50 link), and what the specs say or don't say (with link to the problem, please).

In case of mario, the tester works just fine, but the presentation is suboptimal. It will show one space where any number of spaces is, that's why the pyramid looks the wrong way.

This also hides common mistakes. Those include having extra spaces in front of the pyramid (last line should begin with hashes), not having exactly two spaces between the half-pyramids in mario/more, or having spaces at the end of the line (where they don't belong). In any case, first line (if there's any) contains two hashes in total.

| improve this answer | |
  • 1
    "...and even better than asked, with a more friendly user interface..." is not better. There's a hidden lesson in these psets. "The code has to be written exactly to the specification." So called improvements are not a good thing. In a team programming environment, different people write different parts of a larger program. These parts have to fit together later. If unapproved "improvements" are added, its possible that the pieces won't work together or the customer won't get what they want, causing delays in coding and program integration. So, it's important to code exactly to the spec! – Cliff B Apr 9 '18 at 17:48
  • that is the problem, those specifications weren't explicitly specified. Thank you. – Ricardo Martinelli Apr 9 '18 at 18:32
  • by the way, the outputs are (in my pc) with the spaces on the left side (here they are on the right) as if climbing the stares from left to right as show on the video, and with positioned on the right side, again as on the video. as asked, the link to the evaluation: cs50.me/submit50/results/rickcleansoul/… – Ricardo Martinelli Apr 9 '18 at 18:33
  • This tells me I mentioned one of your problems: You have extra spaces at the beginning of each line. Also, how many lines do you think a pyramid of height 0 has? – Blauelf Apr 9 '18 at 20:30
  • 1
    So, it looks like there are extra spaces at the beginning of every line, possibly an extra line feed following every pyramid, including 0 height, or at the beginning (I'm not sure). Are all of the pyramids right-aligned? Re: specification. The examples at docs.cs50.net/2018/x/psets/1/mario/less/mario.html#usage perfectly demonstrated what the output should do. Yet another hidden lesson is learning to read specifications and interpret exactly what is required. – Cliff B Apr 10 '18 at 2:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .