Guest User

Untitled

a guest
Jun 8th, 2025
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import unittest
  2. 載 測單元
  3.  
  4. class A(unittest.TestCase):
  5. def test_english(self):
  6. pass
  7. assert 1 == 1
  8.  
  9. class B(unittest.TestCase):
  10. def test_for(self):
  11. j = 0
  12. for i in range(15):
  13. if i < 5:
  14. j += 3
  15. elif 5 <= i < 10:
  16. j += 2
  17. else:
  18. if i == 13:
  19. break
  20. j += 1
  21. assert j == 28
  22.  
  23. 類 丙(測單元.測例子):
  24. 函 測中文(吾):
  25. 過
  26. 宣 1 == 1
  27.  
  28. 類 丁(測單元.測例子):
  29. 函 測為(吾):
  30. j = 0
  31. 為 i 在 區間(15):
  32. 如 i < 5:
  33. j += 3
  34. 然 5 <= i < 10:
  35. j += 2
  36. 另:
  37. 如 i == 13:
  38. 斷
  39. j += 1
  40. 宣 j == 28
  41.  
Advertisement
Add Comment
Please, Sign In to add comment