Pass/Fail Classifier
Using the notes' own pass/fail dataset (hours studied + attendance), train a LogisticRegression model and calculate its accuracy on the held-out test set.
Approach: reuse the exact dataset, testsize, and randomstate from the notes' mini project, fit LogisticRegression, predict on X_test, and print the accuracy percentage.
Input: No input.
Output: One line: Accuracy: <percentage>%, to 2 decimal places.
(none)
Accuracy: 100.00%
Hint 1
accuracy_score(y_test, predictions) compares predicted labels to the real ones and returns the fraction correct.
Hint 2
Multiply by 100 and format with :.2f to print it as a percentage.
With the fixed randomstate=42 split, the same 7 training / 3 testing examples are used every run. Fitting LogisticRegression on the training portion and calling accuracyscore(y_test, predictions) on the test portion measures exactly how many of those held-out predictions matched their real pass/fail label — matching the notes' own mini-project result of 100% on this small, clearly-separable dataset.