Alphabet completion rate Introduction
How much of the English alphabet does a given string use? The previous sentence uses 77%. It has 20 unique letters (howmucftenglisapbdvr), and 20/26 ≃ 0.77.
Challenge
For an input string, return the percentage of letters of the English alphabet present in the string.

The answer can be in percentage or in decimal form.

The input string can have upper and lower case, as well as punctuation. However you can assume they have no diacritics or accentuated characters.


Test cases
Input
&quot;Did you put your name in the Goblet of Fire, Harry?&quot; he asked calmly.

Some valid outputs
77%, 76.9, 0.7692

Input:
The quick brown fox jumps over the lazy dog

All valid outputs:
100%, 100, 1

The expected output for &quot;@#$%^&amp;*?!&quot; and &quot;&quot; is 0.
Python 3, 42 bytes



lambda s:len({*s.upper()}-{*s.lower()})/26


Try it online!

We filter all the non-alphabetic characters out of the string by taking the (set) difference of the uppercase and lowercase representations. Then, we take the length and divide by 26.

Python 3, 46 bytes

lambda s:sum(map(str.isalpha,{*s.lower()}))/26


Try it online!

Count the unique alphabetic (lowercase) characters, and divide by 26. In Python 2 it would require 3 more characters; two for changing {*...} to set(...), and one for making 26 a float: 26., to avoid floor division.

Python 3, 46 bytes

lambda s:sum('`'&lt;c&lt;'{'for c in{*s.lower()})/26


Try it online!

Same length, essentially the same as the previous one, but without "built-in" string method.