word = input (" Enter the Word: ")
if word[0].isupper():
word2 = word
elif word.endswith("s"):
word2 = word[:-1]
elif word.endswith("ed"):
word2 = word[:-2]
elif word.endswith("ing"):
word2 = word[:-3]
if len(word2) <=2:
print (word)
else:
print(word2)
错误 - 您的提交引发了 NameError 类型的异常。这发生在您提交的第 11 行。