Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 規則動詞は「ed」,「d」を後置する等の変換を⾏う。また、「c」,「e」,「y」で終わる単語等の例外の処理を
- # ⾏うことが期待される。
- def past_verb(n)
- g = n[-1:]
- while g != 'e' or g != 'ed' :
- print(past_verb(n)+'ed')
- while n[-2:] != ed:
- while n[-2:] != ed:
- print n[-2:]
- print(past_verb("like"))
- print(past_verb("try"))
- print(past_verb("stop"))
- print(past_verb("heat"))
- print(past_verb("picnic"))
- print(past_verb("go"))
- print(past_verb("put"))
- 実⾏結果例
- played
- liked
- tried
- stopped
- heated
- picnicked
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement