LearnPy Hub
← Machine Learning: scikit-learn problems
Easy

Accuracy by Hand

Read the true labels and the predicted labels and print the accuracy (the share that match), rounded to 2 decimal places. You may use accuracy_score or count yourself.

Input

Two lines of space-separated labels: true labels, then predictions (same length).

Output

One number with 2 decimals, e.g. 0.75.

Sample 1

Input
cat dog dog cat
cat dog cat cat
Output
0.75

Sample 2

Input
1 1 1
1 1 1
Output
1.00
solution.py
Output appears here
Hints
Accuracy by Hand · Python practice problem · LearnPy Hub