Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Please fix part of the kata's description:
Each letter of a word scores points according to it's position in the alphabet: a = 1, b = 2, c = 3 etc.
"it's" -> "its"
As a number of comments below, I have experienced a problem with a random test, although basic tests were successfully passed. I used R to solve the program and received:
Test Failed
invalid 'type' (list) of argument
1: replicate(95, {
s <- character()
for (i in seq_len(sample(5:24, 1))) s <- paste(s, paste(sample(letters, sample(10,
1)), collapse = ""), collapse = " ")
expect_equal(high(s), pineapple_express(s))
}) at tests.R:20
2: sapply(integer(n), eval.parent(substitute(function(...) expr)), simplify = simplify)
3: lapply(X = X, FUN = FUN, ...)
4: FUN(X[[i]], ...)
5: expect_equal(high(s), pineapple_express(s)) at tests.R:29
6: quasi_label(enquo(object), label)
7: eval_bare(get_expr(quo), get_env(quo))
8: high(s)
Any ideas why that happen? I also intentionally converted my output field into a single string.
Same issue here:
expect_equal( most_frequent_digit_sum(17),9), while it should be 8.