Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # 規則動詞は「ed」,「d」を後置する等の変換を⾏う。また、「c」,「e」,「y」で終わる単語等の例外の処理を
  2. # ⾏うことが期待される。
  3.  
  4.  
  5. def past_verb(n)
  6. g = n[-1:]
  7.  
  8. while g != 'e' or g != 'ed' :
  9. print(past_verb(n)+'ed')
  10. while n[-2:] != ed:
  11. while n[-2:] != ed:
  12.  
  13.  
  14.  
  15.  
  16. print n[-2:]
  17.  
  18.  
  19. print(past_verb("like"))
  20. print(past_verb("try"))
  21. print(past_verb("stop"))
  22. print(past_verb("heat"))
  23. print(past_verb("picnic"))
  24. print(past_verb("go"))
  25. print(past_verb("put"))
  26. 実⾏結果例
  27. played
  28. liked
  29. tried
  30. stopped
  31. heated
  32. picnicked
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement