#363
The Quizmaster's Conundrum
 

Difficulty:Easy
Topics:Real life cases List of Maps


Mission: "Quizmaster's Conundrum" mengajak elo untuk menjadi seorang master dalam merancang soal kuis. Diberikan sebuah list of maps yang berisi data soal-soal kuis, di mana setiap map memiliki :subject, :difficulty, dan :question-count, tugas elo adalah untuk menyusun jadwal ujian dengan mengelompokkan jumlah soal berdasarkan :subject dan :difficulty. Return map yang menggabungkan semua :question-count berdasarkan :subject dan :difficulty.
test not run
(= (__ [{:subject "Mathematics" :difficulty "Easy" :question-count 10}
        {:subject "Science" :difficulty "Medium" :question-count 5}
        {:subject "Mathematics" :difficulty "Hard" :question-count 3}])
   {"Mathematics" {"Easy" 10, "Hard" 3}, "Science" {"Medium" 5}})
test not run
(= (__ [{:subject "History" :difficulty "Easy" :question-count 4}
        {:subject "History" :difficulty "Easy" :question-count 6}
        {:subject "Geography" :difficulty "Hard" :question-count 2}])
   {"History" {"Easy" 10}, "Geography" {"Hard" 2}})
test not run
(= (__ []) {})
test not run
(= (__ [{:subject "Art" :difficulty "Medium" :question-count 8}
        {:subject "Art" :difficulty "Medium" :question-count 7}
        {:subject "Art" :difficulty "Easy" :question-count 5}])
   {"Art" {"Medium" 15, "Easy" 5}})


Code which fills in the blank: