このコードを入力すると、スライスの動作にエラーが発生します... 入力できず、全体的に動作しません。
verb_1 = raw_input("Enter a word")
verb_2 = verb_1.lower()
verb_2_ending = verb_2[-2:]
if verb_2_ending == "ar":
ar_verb = raw_input("you've chosen an AR verb. What tense would you like")
elif verb_2_ending == "er":
er_verb = raw_input("you've chosen an ER verb. What tense would you like")
else :
ir_verb = raw_input("you've chosen an IR verb. What tense would you like")
if ar_verb == "subjunctive":
subject_1 = raw_input("What is the subject")
elif ar_verb == "present":
subject_2 = raw_input("What is the subject")
else :
subject_3 = raw_input("What is the subject")
エラーが発生します:
Enter a word : hablar
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
TypeError: unsupported operand type(s) for -: 'str' and 'str'