質問編集履歴

1

エラー内容を掲載

2022/07/21 06:24

投稿

waxaxaxa
waxaxaxa

スコア3

test CHANGED
File without changes
test CHANGED
@@ -47,5 +47,33 @@
47
47
  for ent in SeisekiList:
48
48
  print("{:10s} {:>3d} {:3d} {:>3d}".format(ent["NAMAE"],ent["KOKUGO"],ent["SUGAKU"],ent["GOKEI"]))
49
49
  ```
50
+ 下記エラー内容です
51
+ ```ここに言語を入力
52
+ TypeError Traceback (most recent call last)
53
+ <ipython-input-10-d6677c2a86db> in <module>()
54
+ 22 for ent in SeisekiList:
55
+ 23 print("{:10s} {:>3d} {:3d} {:>3d}".format(ent["NAMAE"],ent["KOKUGO"],ent["SUGAKU"],ent["GOKEI"]))
56
+ ---> 24 quick_sort(SeisekiList,0, len(SeisekiList) - 1)
57
+ 25 print("===Sorted===")
58
+ 26 for ent in SeisekiList:
59
+
60
+ 1 frames
61
+ <ipython-input-10-d6677c2a86db> in quick_sort(nums, beginning, ending)
62
+ 11 def quick_sort(nums, beginning, ending):
63
+ 12 if beginning < ending:
64
+ ---> 13 pivot_index = partition(nums, beginning, ending)
65
+ 14 quick_sort(nums, beginning, pivot_index - 1)
66
+ 15 quick_sort(nums, pivot_index + 1, ending)
67
+
68
+ <ipython-input-10-d6677c2a86db> in partition(nums, beginning, ending)
69
+ 3 pivot = nums[ending]
70
+ 4 for j in range(beginning, ending):
71
+ ----> 5 if nums[j] <= pivot:
72
+ 6 i += 1
73
+ 7 nums[i], nums[j] = nums[j], nums[i]
74
+
75
+ TypeError: '<=' not supported between instances of 'dict' and 'dict'
76
+ ```
50
77
 
51
78
  どの部分を変えればエラーが発生せずに動くようになりますか?
79
+