Fix: Ensure all skills are tracked as files, not submodules
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# HumanEval/125
|
||||
# Loki Mode Multi-Agent Solution
|
||||
# Attempts: 1
|
||||
# Passed: True
|
||||
|
||||
def split_words(txt):
|
||||
'''
|
||||
Given a string of words, return a list of words split on whitespace, if no whitespaces exists in the text you
|
||||
should split on commas ',' if no commas exists you should return the number of lower-case letters with odd order in the
|
||||
alphabet, ord('a') = 0, ord('b') = 1, ... ord('z') = 25
|
||||
Examples
|
||||
split_words("Hello world!") ➞ ["Hello", "world!"]
|
||||
split_words("Hello,world!") ➞ ["Hello", "world!"]
|
||||
split_words("abcdef") == 3
|
||||
'''
|
||||
if ' ' in txt:
|
||||
return txt.split()
|
||||
elif ',' in txt:
|
||||
return txt.split(',')
|
||||
else:
|
||||
count = 0
|
||||
for char in txt:
|
||||
if char.islower() and (ord(char) - ord('a')) % 2 == 1:
|
||||
count += 1
|
||||
return count
|
||||
Reference in New Issue
Block a user