0
code coach in community
In category “normal” there’s a problem statement named “average word length”. It’s test case 1 result is given wrong. Mods please check and confirm.
4 Respuestas
+ 7
chess doctor ,
please link your code here, also give a description that is a bit more specific to youd issue.
+ 5
chess doctor ,
this is a part of the task description that has not been taken into account:
> remove all punctuation
> *round up* to the nearest whole number
try to apply this to your code. check also the complete if... else... conditional if you really need it.
+ 2
a=input()
a=a.split(" ")
s=0
for i in a:
s+=len(i)
avg=s/len(a)
if avg<=round(avg):
print(round(avg))
else:
print(round(avg)+1)
This is the code for average word length. It is the problem statement in “medium” catagory of code coach in community section.
The issue is that after running this code all test cases except “test case 1” are right. “Test case 1” shows wrong answer in the app. Please change the answer with the right one.
+ 1
Thanks lothar