Chapter 9 Assignment and Vocareum (Edit: Resolved!)

I’m having some issues getting Vocareum to accept my Chapter 9 assignment. The code runs fine (as far as I can tell). It seems to be just Vocareum having problems with the answers it produces. I tried switching from using string concatenation to using str.format and still get the same errors, so any input/suggestions would be much appreciated.

I’m getting these errors using str.format:

[Executed at: Sun Aug 5 7:16:19 PDT 2018]

Grade: 0
Your code failed the following tests:

:heavy_multiplication_x: ︎For analyze_text(‘Eeeee’)

You should have returned this:
“The text contains 5 alphabetic characters, of which 5 (100.0%) are ‘e’.”

But you actually returned this:
‘The text contains 5 alphabetic characters, of which 5 (100.0%) are e.’

:heavy_multiplication_x: ︎For analyze_text(‘Blueberries are tastee!’)

You should have returned this:
“The text contains 20 alphabetic characters, of which 6 (30.0%) are ‘e’.”

But you actually returned this:
‘The text contains 20 alphabetic characters, of which 6 (30.0%) are e.’

:heavy_multiplication_x: ︎For analyze_text(“Wright’s book, Gadsby, contains a total of 0 of that most common symbol ;)”)

You should have returned this:
“The text contains 55 alphabetic characters, of which 0 (0.0%) are ‘e’.”

But you actually returned this:
‘The text contains 55 alphabetic characters, of which 0 (0.0%) are e.’

:heavy_multiplication_x: ︎For analyze_text(‘Werewolf bar mitzvah, spooky! scary! Boys becoing men… men becoming wolves.’)

You should have returned this:
“The text contains 60 alphabetic characters, of which 7 (11.666666666666666%) are ‘e’.”

But you actually returned this:
‘The text contains 60 alphabetic characters, of which 7 (11.666666666666666%) are e.’

Just glancing at your errors, the first thing I see is that I think you may have left single quotes off the last ‘e’ in the sentence…

2 Likes

Thank you! I was spending so much time looking at string concatination vs str.format I neglected that obvious error! It’s working now.

1 Like