SHARE
TWEET

Untitled

a guest Jul 17th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top