0
Test case arguments
What do we put in for the argument to be able to run all the test cases? Right now I can only put in the data for each individual test. There’s got to be a better way.
3 Antworten
+ 5
Adam Fisher , please show us your code so that we can see how you did it. thanks!
0
I don't get what you mean...
... Is 'input()' what you are looking for?
0
def avg_word(string):
import math
word_list = string.split()
word_count = len(word_list)
count = 0
for word in word_list:
if not word.isalpha():
stripped = ""
for char in word:
if char.isalpha():
stripped += char
count += len(stripped)
else:
count += len(word)
print(math.ceil(count/word_count))
avg_word(WHAT GOES HERE?)