You want to compare two different models on the same small quiz. The point is that only the line that makes the model changes.
Task: write quiz_both_models(train_rows, train_labels, check_rows, check_labels).
KNeighborsClassifier(n_neighbors=3) on train_rows and train_labels.DecisionTreeClassifier(random_state=0) on the same rows.check_rows and check_labels. The score is the fraction of check rows it gets right.{"knn": ..., "tree": ...} with each score rounded to 2 decimal places.