我必须从HP Codewars 2012中返回spellbinder程序,我不知道我在做什么。这是我到目前为止所拥有的,请帮忙。我使用的是python3.3.0。这是链接http://www.hpcodewars.org/past/cw15/problems/2012ProblemsFinalForPrinting.pdf
def fix (string):
'''The function of the repaired by a
speelbot abused Dictionary
word -> word to be repaired
a -> the point-to-exchange
b -> the correct letter
'''
word, a, b = string.split ( " " )
return word.replace (a, b)
for word in [ '"MUSTARD MC " , "JUNK J TR" , "MONSTER ON A" ']:
print (word, "->" to repair (word))
我不想这么做。你知道吗
你应该试着去调试和解决问题。你知道吗
相关问题 更多 >
编程相关推荐