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.

14th Feb 2021, 6:34 PM
Adam Fisher
Adam Fisher - avatar
3 Antworten
+ 5
Adam Fisher , please show us your code so that we can see how you did it. thanks!
14th Feb 2021, 6:40 PM
Lothar
Lothar - avatar
0
I don't get what you mean... ... Is 'input()' what you are looking for?
14th Feb 2021, 6:40 PM
Angelo
Angelo - avatar
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?)
14th Feb 2021, 10:16 PM
Adam Fisher
Adam Fisher - avatar