Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
your code counts punctuation marks. import re import math phrase = input() count_words = len(phrase.split()) only_charac = phrase.replace(' ', '') only_charac = len(''.join(re.findall('[A-Za-z]', only_charac))) print(math.ceil(only_charac / count_words))
13th Apr 2020, 10:15 AM
Yurii Ostapenko
Yurii Ostapenko - avatar