Your question is Calculate Classification Accuracy. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given two arrays of equal length, y_true and y_pred, return the classification accuracy as a floating-point value. Accuracy is defined as the number of matching labels divided by the total number of labels. If the input arrays have different lengths or are empty, return 0.0.
def calculate_accuracy(y_true, y_pred):