Cody

# Problem 43635. Return the amount of palindromes (words) in the string.

Solution 2023921

Submitted on 16 Nov 2019 by Athi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
s='eye story pop dictionary noon enjoy software moon' assert(isequal(Palindromes(s),3))

s = 'eye story pop dictionary noon enjoy software moon'

2   Pass
s='keep running' assert(isequal(Palindromes(s),0))

s = 'keep running'

3   Pass
s='the two men stood face to face' assert(isequal(Palindromes(s),0))

s = 'the two men stood face to face'

4   Pass
s='Did he do that?' assert(isequal(Palindromes(s),1))

s = 'Did he do that?'

5   Pass
s='The civic duty of Anna was to level the kayak attached to the racecar at noon, so said her mom.' assert(isequal(Palindromes(s),7))

s = 'The civic duty of Anna was to level the kayak attached to the racecar at noon, so said her mom.'

6   Pass
s='Did she or did bob or did mom wow Anna at noon?' assert(isequal(Palindromes(s),8))

s = 'Did she or did bob or did mom wow Anna at noon?'

7   Pass
s='The rotor rotated on the level table.' assert(isequal(Palindromes(s),2))

s = 'The rotor rotated on the level table.'