Skip to content
CodeItRaw
Code Reading
/
Count the Words
Path
Play
Daily
Leaderboard
tr
Break the Code
Count the Words
Write a text for which this function gives the wrong answer.
1
def
count_words
(text):
2
return
text.count(
" "
) +
1