# [Community Puzzle] Histogram - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Created by @Ribak,validated by @DeanTheMachine,@vexilla72 and @Drunkey.
If you have any issues, feel free to ping them.

Hey, I might not be getting something in the problem here: â€śWe only want the letters from A-Z and a-zâ€ť: ok but only A-Z to the Y axis right? so weâ€™re counting an â€śaâ€ť and an â€śAâ€ť as 2 â€śaâ€ť's right? Weâ€™re also flat out excluding anything thatâ€™s not [A-Za-z] right?

Iâ€™m asking as I did a frequency counter on the lorem ipsum, C is counted as 4.34 rounded up but thereâ€™s 16 out of 369 characters so: 4.33604336 and the error Iâ€™m getting is:
Found: Â±Â±â€“+â€¦
Expected: Â±Â±-+

The only place I have the â€śfoundâ€ť string is before C, B is lower so C is what makes the length of that bar, so youâ€™re expecting 3 to 4% for C and Iâ€™m not getting what Iâ€™m missing.

The tests are even worse I score 25% which makes me feel like I misunderstood what Iâ€™m supposed to do but canâ€™t suss out what it is.

Any help would be gratefully received.

Yes, a and A are both counted for A and non-alpha char are excluded from total.

If B is 1% (rounded), C is 4% rounded and A an D is 0% rounded, then you need to print this (other part of histogram omitted):

``````  +-+
B | |1.xx%
+-+--+
C |    |4.xx%
+----+
D |0.00%
+
``````

Note: Your error message is not really helpful. Sometimes I find it better to (temporaily) print my solution to error stream so I can check and compare with the expected in full, and not stopping at the first mismatch.

1 Like

A post was merged into an existing topic: Code edition section not displayed nor editable

My code passes all tests but fails at submit number 4 (Lorem ipsum (2)).
I canâ€™t find what is wrong.

Maybe need more data for testing.

If you want, you may send me your code in private message and Iâ€™ll take a look at what may have gone wrong.

Thank you 5DN1L for finding the case where it doesnâ€™t work.
It was on the case where two consecutive values were < 0.5.

1 Like

I enjoyed finishing this with C language,
The hardest part was the graphical part and where to put â€ś+â€ť when two concecutive letters have different percentage.