+ 1

average length problem

import math sum=0 x=input() b=x.split() for i in b: c=len(i) sum=sum+c aver=len(b) average=sum/aver print(round(average)) if I use round i fail test 3 if i use ceil i fail test 1 lol

31st May 2020, 12:34 PM
Abdul Majeed Faraz
Abdul Majeed Faraz - avatar
3 ответов
+ 4
Punctuation should not be counted,is your code doing that?
31st May 2020, 12:50 PM
Abhay
Abhay - avatar
+ 1
just checked it seems yes it does ah gota go will reply when iam back sorry
31st May 2020, 12:55 PM
Abdul Majeed Faraz
Abdul Majeed Faraz - avatar
+ 1
thanks i solved it by removing punc
1st Jun 2020, 11:58 AM
Abdul Majeed Faraz
Abdul Majeed Faraz - avatar