[Question]
  [
## 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
```
"Did you put your name in the Goblet of Fire, Harry?" 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 `"@#$%^&*?!"` and `""` is 0.
  
[Answer]
# [Python 3](https://docs.python.org/3/), 42 bytes
```
lambda s:len({*s.upper()}-{*s.lower()})/26
```
[Try it online!](https://tio.run/##PYyxDoIwFEV3v@KGhWIUE00cTIyLUT/A0aVA0Urpq6UVq/HbERicbk5O7jHB3UivunJ76RSvs4Kj2Sih2WfapN4YYVnynQ@gqB0hWSzXnbFSO1ayONrLAoE8jHfDWmheC0gNdxM4UqaEA5U4SCtmOHFrwy5Cr3hTiQI5V7UKaZwkk3/y3NuHl3mFzFKrUdILd1@bBvQUduwq/g4o6Nr/uh8 "Python 3 – 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](https://docs.python.org/3/), 46 bytes
```
lambda s:sum(map(str.isalpha,{*s.lower()}))/26
```
[Try it online!](https://tio.run/##PYyxbgIxEAX7fMUTDXaEDolIKSJFNCjJB1DS7HG@nMH2OmsbMCjffhwpUk0xmok1Dxxexv59NzrybUdIb6l45SmqlKWxiVwcaHF7To3jsxGlf7Verl7HKDZk1av5bGM7VC6IJT8oCOQNbEAeDD65dSaDe3xYMQt8kUhdzzApSkfTYU/Ou9rMtX76X24n@1Ps/ohW@BzQ8wWH4mMCn4z8fR1dKzr@nrrxDg "Python 3 – 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](https://docs.python.org/3/), 46 bytes
```
lambda s:sum('`'<c<'{'for c in{*s.lower()})/26
```
[Try it online!](https://tio.run/##PYyxbsIwGAZ3nuITixNUUQkkBgTqgmgfgJGhTmITg@0//W1DDeLZQ2BguuF01@XYkp/3er3vrXRVIxGWIblC/IpVvRI3oYlRw/jbJEwtXRQX5b38nC36jo2PhS7EeGMaZEroUnyS4aVTQ4LYKnxTZVUEaWwNqw/8SOb8NcagZDipBrW0zuapKMvRe7kb7F8y9QkV08VD0z@OyXUBdFb8@lp5zWjoMHT9Aw "Python 3 – Try It Online")
Same length, essentially the same as the previous one, but without "built-in" string method.
[Answer]
# [MATL](https://esolangs.org/wiki/MATL), 8 bytes
```
2Y2jkmYm
```
Try it at [MATL Online](https://matl.io/?code=2Y2jkmYm&inputs=%22Did+you+put+your+name+in+the+Goblet+of+Fire%2C+Harry%3F%22+he+asked+calmly.&version=20.11.0)
**Explanation**
```
2Y2    % Predefined literal for 'abcdefghijklmnopqrstuvwxyz'
j      % Explicitly grab input as a string
k      % Convert to lower-case
m      % Check for membership of the alphabet characters in the string. 
       % Results in a 26-element array with a 1 where a given character in 
       % the alphabet string was present in the input and a 0 otherwise
Ym     % Compute the mean of this array to yield the percentage as a decimal
       % Implicitly display the result
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~8~~ ~~7~~ 6 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
lASåÅA
```
-1 byte thanks to *@LuisMendo*.
[Try it online](https://tio.run/##yy9OTMpM/f8/xzH48NLDrY7//yu5ZKYoVOaXKhSUloDoIoW8xNxUhcw8hZKMVAX3/KSc1BKF/DQFt8yiVB0Fj8Siokp7JQWgVGJxdmqKQnJiTm5OpR4A) or [verify a few more test cases](https://tio.run/##HY5BbsIwFET3OcU0pSwQ6hUCEgX2sEb6ST6Ji@Mf7DjUVbflANyBk3ATLhIMq5FmNE9PHOWKh78@ZCnu5wvSLAx6vrldb//zYTqs5YTGFzVkj65mfJlKK1eDdFtTzh1KYQdCpXo2cJ1VpoJ3nCXpQpUI4tH67pkWhhqGMi/OSnId35G6VJanWJO1T4U4kTtwiYJ0o8Nnso3N0avigNzKyWAvP/j2TesgPdsXS9NviB5VMnsffezGk@ztAQ).
**6 bytes alternative provided by *@Grimy*:**
```
láÙg₂/
```
[Try it online](https://tio.run/##yy9OTMpM/f8/5/DCwzPTHzU16f//r@SSmaJQmV@qUFBaAqKLFPISc1MVMvMUSjJSFdzzk3JSSxTy0xTcMotSdRQ8EouKKu2VFIBSicXZqSkKyYk5uTmVegA) or [verify a few more test cases](https://tio.run/##HY69bcMwFIR7TXFREheB4YygFP4bIHWAJ@mZokXxyaQoh0YqFxkgXcrM4k28iEK7OuAO9@ETT6Xm6WuMRY7r9w/yIk7m8nf5Vdfz@XWaT1s5ogtVA9lhaBgrq4z2Dcj0DZU8oBb2ICg9soUfnLYKwXOR5UtdI0pAH4ZbOljqGNreORspTXon6lo7nmNLzt0k0kS@5RoVmc7ERfaemkPQVYvSydFiJ5/Yh673kJHdnWXoFJOHyt4en54/Zi/Fwz8).
Both programs output as decimal.
**Explanation:**
```
l       # Convert the (implicit) input-string to lowercase
 AS     # Push the lowercase alphabet as character-list
   å    # Check for each if it's in the lowercase input-string
        # (1 if truthy; 0 if falsey)
    ÅA  # Get the arithmetic mean of this list
        # (and output the result implicitly)
l       # Convert the (implicit) input-string to lowercase
 á      # Only leave the letters in this lowercase string
  Ù     # Uniquify it
   g    # Get the amount of the unique lowercase letters by taking the length
    ₂/  # Divide this by 26
        # (and output the result implicitly)
```
[Answer]
# [Octave](https://www.gnu.org/software/octave/) / MATLAB, 33 bytes
```
@(s)mean(any(65:90==upper(s)',1))
```
[Try it online!](https://tio.run/##FclLCsIwFEbhrfx0kgRK0IGCQtCBqNu4tjdYzIs0EbL6WEcHvhOnQl/u1mit@1WuyjMFSaHJ4@F82hlTU@K8uRj3SnUrxXBbZrRYkWr5NyOQZywB5c14xJfjgmhxXzKPeFLO7TJgW7R@eMZEzrumheo/)
### Explanation
```
@(s)                               % Anonymous function with input s: row vector of chars
             65:90                 % Row vector with ASCII codes of uppercase letters
                    upper(s)       % Input converted to uppercase
                            '      % Transform into column vector
                  ==               % Equality test, element-wise with broadcast. Gives a
                                   % matrix containing true and false
         any(                ,1)   % Row vector containing true for columns that have at
                                   % least one entry with value true
    mean(                       )  % Mean
```
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), ~~56~~ 49 bytes
```
a=>a.ToUpper().Distinct().Count(x=>x>64&x<91)/26f
```
[Try it online!](https://tio.run/##VY29bsJAEIR7nmLkIrIlcJQoQorApggiKShBaWiO8x5ZsG@d@wl2Xt6YdKlmpJn5RvuZ9jxsotVLHxzb07SSeKyphCkGVZQq38m@bcmlWb5mH9jqMNo3iTakXVF25fzloVu@PmWPz3MzLCaTT8eBtmwpNWlySNZcoZeINoa7OljVENgifBHeZbwKEIMNO5riQznXY4VDgjFV/kIVtKqbus@TLFv8Z@/GyndkfcHRydXCSIdzbFoP@SH3x6/Vb49KTvfxcAM "C# (Visual C# Interactive Compiler) – Try It Online")
*-6 bytes thanks to [innat3](https://codegolf.stackexchange.com/users/86178/innat3)*
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 10 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?")[SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set")
Anonymous tacit prefix function. Returns decimal fraction.
```
26÷⍨∘≢⎕A∩⌈
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn/38js8PZHvSsedcx41LnoUd9Ux0cdKx/1dPxPe9Q24VFvH1DE0/9RV/Oh9caP2iYCecFBzkAyxMMz@H@agrqSS2aKQmV@qUJBaQmILlLIS8xNVcjMUyjJSFVwz0/KSS1RyE9TcMssStVR8EgsKqq0V1IASiUWZ6emKCQn5uTmVOqpcwGNCgGKFpZmJmcrJBXll@cppOVXKGSV5hYUK@SXpRaBzctJrKpUSMlPB6t3UFZRjVPTslcE89QB "APL (Dyalog Extended) – Try It Online")
`⌈` uppercase
`⎕A∩` intersection with the uppercase **A**lphabet
`≢` tally length
`∘` then
`26÷⍨` divide by twenty-six
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), ~~27~~ 24 bytes
*-3 bytes thanks to nwellnhof*
```
*.uc.comb(/<:L>/).Set/26
```
[Try it online!](https://tio.run/##HYy9DoIwGEV3nuKGgagxJXFg8AcXow5u@gKlfGilpVhatb58RZd7knOS25NVRdQBWYMN4ox5wYTR1SRfL09lPmVncvmiiKtEyY6GsmRZM87AQ0x3skYwHr13P1p0XBNkB3cjHEylyME02EtLcxy5tWGbYkx8aKmG4EqrwJLLaB5eihaVNa8OjXnj7nU/wDzJ/r8U/wTU5voF "Perl 6 – Try It Online")
[Answer]
## Bash and Gnu utils (81 78 68 60 42 bytes)
```
bc -l<<<`grep -io [a-z]|sort -fu|wc -l`/26
```
-8 bytes thanks to [@wastl](https://codegolf.stackexchange.com/users/78123/wastl)
-18 bytes thanks to [Nahuel](https://codegolf.stackexchange.com/users/70745/nahuel-fouilleul) using some tricks I didn't know:
* `sort -f` and `grep -i` ignore case
* `sort -u` is a replacement for `| uniq`
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), ~~19~~ 15 bytes
**Solution:**
```
1%26%+/26>?97!_
```
[Try it online!](https://tio.run/##y9bNz/7/31DVyExVW9/IzM7e0lwxXilGySUzRaEyv1ShoLQERBcp5CXmpipk5imUZKQquOcn5aSWKOSnKbhlFqXqKHgkFhVV2scoKQDlEouzU1MUkhNzcnMq9ZT@/wcA "K (oK) – Try It Online")
**Explanation:**
Convert input to lowercase, modulo 97 ("a-z" is 97-122 in ASCII, modulo 97 gives 0-25), take unique, sum up results that are lower than 26, and convert to the percentage of 26.
```
1%26%+/26>?97!_ / the solution
              _ / lowercase
           97!  / modulo (!) 97
          ?     / distinct
       26>      / is 26 greater than this?
     +/         / sum (+) over (/)
  26%           / 26 divided by ...
1%              / 1 divided by ...
```
**Notes:**
* **-1 bytes** thanks to ngn, `1-%[;26]` => `1-1%26%`
* **-3 bytes** inspired by ngn `#(!26)^` => `+/26>?`
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 55 52 bytes
```
($args|% *per|% t*y|sort|gu|?{$_-in65..90}).count/26
```
[Try it online!](https://tio.run/##FclBCsIwEADAryylUi0aRbDgqRdRfyGxXdvQNBs2CRKMb4/1NIex9EZ2I2qd87qUPLi0gtoiL/g6Jkfs0xBS@ykfO2WakxDnw3cjOgrG749NzrkqLqqHSAFs8H8ZjJwRlAE/ItzoqdEDveCqGLdwl8yxLWAp6SbsoZN61lFUPw "PowerShell – Try It Online")
First attempt, still trying random ideas
EDIT: @Veskah pointed out ToUpper saves a byte due to the number range, also removed extra `()` and a space
Expansion:  
`($args|% ToUpper|% ToCharArray|sort|get-unique|where{$_-in 65..90}).count/26` 
Changes string to all loweruppercase, expands to an array, sorts the elements and selects the unique letters (gu needs sorted input), keep only characters of ascii value 97 to 122 (a to z) 65 to 90 (A to Z), count the total and divide by 26 for the decimal output
[Answer]
# [R](https://www.r-project.org/), 47 bytes
```
function(x)mean(65:90%in%utf8ToInt(toupper(x)))
```
[Try it online!](https://tio.run/##HYxND8EwHMbvPsWjjFVEXAgSmYN4uTtLamupbf1P17L58jM7PXnefrZR2KJR3sROkwkrnkthwuVis54H2gTeqdWFzsaFjnxRSNsuOG9UOGZ7naAmj8K7v1oYkUtoA/eQONItkw6kcNBWTnES1tYRQ1uJMpUJYpHlWT0b817LurTxy@s4xc3Sx0BRhafPixL0lrYDZuJbI6F7d2C7wTC4jiZRn3WW8eYH "R – Try It Online")
Converts to upper case then to ASCII code-points, and checks for values 65:90 corresponding to A:Z.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 45 bytes
```
T`Llp`ll_
+`(.)(.*\1)
$2
.
100$*
^
13$*
.{26}
```
[Try it online!](https://tio.run/##HY49T8MwGIR3/4qjpCgNyGqKxJoOQDswdkQlTvI2cevYwR8tAfHbg@n0SHe6R2fJSy2mebopp135poZSqQ92X6Z8kfLsPV@wZMU4y5fLJGN7lj9G8J/V0@80bc0Ffag7mAN8R3jRrZKug1BDJyryaAw5CLTyTBrOW6lbBEcFmz3LBqMJGIL/p4UWPUHqq2djKhXX0foqLT1gK6wdixliJdyJGtRC9WrkbBeTzyDrEyprLhoH84Vj6AcHcyZ7dSnxPcYfLVvfJvP9XVbc/AE "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
T`Llp`ll_
```
Lowercase letters and delete punctuation.
```
+`(.)(.*\1)
$2
```
Deduplicate.
```
.
100$*
```
Multiply by 100.
```
^
13$*
```
Add 13.
```
.{26}
```
Integer divide by 26 and convert to decimal.
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 8 bytes
```
⌹∘≤⍨⎕A∊⌈
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn//1HPzkcdMx51LnnUu@JR31THRx1dj3o6/qc9apvwqLcPKOLp/6ir@dB640dtE4G84CBnIBni4Rn8P01BXcklM0WhMr9UoaC0BEQXKeQl5qYqZOYplGSkKrjnJ@Wklijkpym4ZRal6ih4JBYVVdorKQClEouzU1MUkhNzcnMq9dS5gEaFAEULSzOTsxWSivLL8xTS8isUskpzC4oV8stSi8Dm5SRWVSqk5KeD1Tsoq6jGqWnZK4J56gA "APL (Dyalog Extended) – Try It Online")
loosely based on [Adám's answer](https://codegolf.stackexchange.com/a/187211/24908)
`⌈` uppercase
`⎕A∊` boolean (0 or 1) vector of length 26 indicating which letters of the English **A**lphabet are in the string
`⌹∘≤⍨` arithmetic mean, i.e. matrix division of the argument and an all-1 vector of the same length
[Answer]
# Java 8, ~~62~~ 59 bytes
```
s->s.map(c->c&95).distinct().filter(c->c%91>64).count()/26.
```
-3 bytes thanks to *@OlivierGrégoire*.
[Try it online.](https://tio.run/##jZFPbxMxEMXv/RSPhVa7tDEqaiu1iIQD0HJoL@VGW2nidbJOvPbisROWKp89TJZwRfXB/2b8fm/GC1rRaFEvt9oRM27J@ucDwPpk4oy0wd3uCNQhT52BLhfyQOVkneIUDbXqm0/3ww5cfZDczYFMnChZjTt4fMSWR2NWLXWlHo310eV5pWrLyXqdykrNrBPWEDq8PB1fnFVKh@wl9O79hdruJDthi9pedBVsjVaMlsK1fv7jEVT9dTkLcX8JxhW8WeNfznNxE9Zos24QZkiNwRc/d5YbkOsampokNRoGYW5XxgtskMlsJsXJIP6/UTwUn8VVH7KYTbs1wlNrpJED6zpI99KO/NVGc4IbirGfPBSQGPHS1NDkWterl7C@y6Of2eolpjGsvVT9C4vcdoywMnHgOfrdSz3zl8h9ev3m8Ono7eRVsan22fc9J9OqkJPqpA3J@ZKPiysUx17pkpVuKHJZVfsP32z/AA)
**Explanation:**
```
s->                     // Method with IntStream as parameter and double return-type
  s.map(c->c&95)        //  Convert all letters to uppercase
   .distinct()          //  Uniquify it
   .filter(c->c%91>64)  //  Only leave letters (unicode value range [65,90])
   .count()             //  Count the amount of unique letters left
    /26.                //  Divide it by 26.0
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 11 bytes
```
Ｉ∕ＬΦβ№↧θι²⁶
```
[Try it online!](https://tio.run/##FYoxEoIwEAB7X3FDlcxECwsbCwsYtKDwC0c45caQ6HHg8PoYm91i148oPmHI@S4c1dQ4q2l45YFMR/Gpo2k5KInpHdRpKUuXviQeZzIf64CtLTyeis45Vw0PsKUF3ov@LRBxIuAIOhJcUx9IIT2gZSEHNxTZLhWUhPOLBvAYprAddnm/hh8 "Charcoal – Try It Online") Link is to verbose version of code. Output is as a decimal (or `1` for pangrams). Explanation:
```
  Ｌ         Length of
    β       Lowercase alphabet
   Φ        Filtered on
     №      Count of
        ι   Current letter in
      ↧     Lowercased
       θ    Input
 ∕          Divided by
         ²⁶ Literal 26
Ｉ           Cast to string
            Implicitly printed
```
[Answer]
## Batch, 197 bytes
```
@set/ps=
@set s=%s:"=%
@set n=13
@for %%c in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)do @call set t="%%s:%%c=%%"&call:c
@cmd/cset/an/26
@exit/b
:c
@if not "%s%"==%t% set/an+=100
```
Takes input on STDIN and outputs a rounded percentage. Explanation:
```
@set/ps=
```
Input the string.
```
@set s=%s:"=%
```
Strip quotes, because they're a headache to deal with in Batch.
```
@set n=13
```
Start with half a letter for rounding purposes.
```
@for %%c in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)do @call set t="%%s:%%c=%%"&call:c
```
Delete each letter in turn from the string. Invoke the subroutine to check whether anything changed, because of the way Batch parses variables.
```
@cmd/cset/an/26
```
Calculate the result as a percentage.
```
@exit/b
:c
```
Start of subroutine.
```
@if not "%s%"=="%t%" set/an+=100
```
If deleting a letter changed the string then increment the letter count.
[Answer]
# [Pepe](https://github.com/Soaku/Pepe), ~~155~~ 138 bytes
```
rEeEeeeeeEREeEeEEeEeREERrEEEEErEEEeReeReRrEeeEeeeeerEEEEREEeRERrErEErerREEEEEeREEeeRrEreerererEEEEeeerERrEeeeREEEERREeeeEEeEerRrEEEEeereEE
```
[Try it online!](https://soaku.github.io/Pepe/#!aa!bpF--i!o/.-!8g!qT&-_E$@&1!l-_*$$Ds_-!c!r-!85@-_wM) Output is in decimal form.
**Explanation:** 
```
rEeEeeeeeE REeEeEEeEe # Push 65 -> (r), 90 -> (R)
REE # Create loop labeled 90 // creates [65,66,...,89,90]
  RrEEEEE # Increment (R flag: preserve the number) in (r)
  rEEEe # ...then move the pointer to the last
Ree # Do this while (r) != 90
Re # Pop 90 -> (R)
RrEeeEeeeee rEEEE # Push 32 and go to first item -> (r)
REEe # Push input -> (R)
RE RrE # Push 0 on both stacks, (r) prepend 0
rEE # Create loop labeled 0 // makes input minus 32, so the
    # lowercase can be accepted, since of rEEEEeee (below)
  re # Pop 0 -> (r)
  rREEEEEe REEee # Push item of (R) minus 32, then go to next item 
  RrE # Push 0 -> (R)
ree # Do while (R) != 0
rere # Pop 0 & 32 -> (r)
rEEEEeee # Remove items from (r) that don't occur in (R)
         # Remove everything from (r) except the unique letters
rE # Push 0 -> (r)
RrEeee # Push reverse pointer pos -> (r)
REEEE # Move pointer to first position -> (R)
RREeeeEEeEe # Push 26 -> (R)
rRrEEEEee reEE # Divide it and output it
```
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), 19 bytes
```
1%26%26-#(!26)^97!_
```
[Try it online!](https://tio.run/##y9bNz/7/P83KUNXIDIh0lTUUjcw04yzNFeP/pykoxSi5ZKYoVOaXKhSUloDoIoW8xNxUhcw8hZKMVAX3/KSc1BKF/DQFt8yiVB0Fj8Siokr7GCUFoFxicXZqikJyYk5uTqWeEtd/AA "K (oK) – Try It Online")
# [J](http://jsoftware.com/), 30 bytes
```
26%~26-u:@(97+i.26)#@-.tolower
```
[Try it online!](https://tio.run/##PYzBCoJAGAbvPsWHEVukS3gwEiKhqA6dohdYda2t1d9Wt7JDr27WocMwh4G5dC5nORYRGDxMEfX4HKvDftMF4fAdhL6N4tF8NlE8CMeD2OcNaXpI040dODI9E3Iwd60ytGRR2eZrg1IUEqpEc5bYUqJlA8qxUUZ62Alj2qWLPon6KjOkQhe65ez/O/bpZlV6RWLoUSKnJy62qGrQXZrfVItXi4xOrPsA "J – Try It Online")
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), ~~57~~ ~~46~~ 35 bytes
```
.
$L
[^a-z]
D`.
.
100*
^
13*
_{26}
```
-11 bytes taking inspiration from [*@Neil*'s trick of adding unary 13 before dividing](https://codegolf.stackexchange.com/a/187223/52210).  
Another -11 bytes thanks to *@Neil* directly.  
[Try it online.](https://tio.run/##HY5NT8JAGITv768YEYxptGlBUU/1A4WDR2/Gwtt2aVe2u7jbBYvxt9fKaZKZPE/GikZqjrvR@XzVhTR8pfeULw8fRLNVSCHFURRQSvEkoOXPePrbdQuzR@3zCmaNphJ41qWSrgKrbcWZaFAY4cAo5U5ouMZKXcI7kdBgJgu0xmPrm/@00FwLSH30zE2merq3vkgrLrBga9tkgH5itxEFcla1akN665svL/MNMmv2GmvzjU9fbx3MTtijS/Gh7X@UdH86HKVnQXJCnOXF0@MDxePJ1fX05vYuWvIf)
**~~57~~ ~~46~~ 40 bytes version which works with decimal output:**
```
.
$L
[^a-z]
D`.
.
1000*
C`_{26}
-1`\B
.
```
Same -11 bytes as well as an additional -6 bytes thanks to *@Neil*.
Outputs with one ***truncated****†* decimal after the comma (*†* i.e. \$0.1538\$ (\$\frac{4}{26}\$) is output as `15.3` instead of `15.4`). This is done by calculating \$\lfloor{\frac{1000 × \text{unique\_letters}}{26}\rfloor}\$ and then inserting the decimal dot manually.
[Try it online.](https://tio.run/##HY5NT8JAFEX371c8EYwhMmlRUVdVQGHh0p0KfW2HdmQ6U@cDKMbfXkdWN7k35@Qa7oSiuBtcLtKOQf8V3lc0On4CzFMGDOIoioYwS9c/48kvjOL0Ywqs65Z6j7XPK9QbdBXHZ1VKYSsk2VSUcYeF5hYJS7HjCq0zQpXoLU@gNxcFttpj491/GlRUcxTq5FnoTAY6WF@E4Ve4JGPapIdhIrvlBeYka9kyeAvNtxf5FjOj9wo3@oBfvm4s6h03J5ekYxt@lPB43h@sLobJGVCWF7PpE8Tj65vbyd39Q7SmPw)
**Explanation:**
Convert all letters to lowercase:
```
.
$L
```
Remove all non-letters:
```
[^a-z]
```
Uniquify all letters:
```
D`.
```
Replace every unique letter with 1000 underscores:
```
.
1000*
```
Count the amount of times 26 adjacent underscores fit into it:
```
C`_{26}
```
Insert a dot at the correct place:
```
-1`\B
.
```
[Answer]
# [Julia 1.0](http://julialang.org/), 34 bytes
```
s->sum('a':'z'.∈lowercase(s))/26
```
Uses the [vectorized](https://docs.julialang.org/en/v1/manual/mathematical-operations/#man-dot-operators-1) version of the ∈ operator, checking containment in the string for all characters in the range from a to z. Then sums over the resulting BitArray and divides by total number of possible letters. 
[Try it online!](https://tio.run/##ZYxLDoIwFEXnruKJH8D4iQ4cmCgOjLoAxyZPKFooLb5S@azAdboRrM6Md3KT@zmJERznVRuvWz3ZaJN5Lrort3Gnr@dTqJJRiJp52vdni2WbE5eFkF7sEZaO1Y5HUCsDuSk@TiAxY8AlFDcGB3URrAAVw54TG8MRierAAVuhTlkEIYpM1FPL8f3OL/tkR3fDwxQupEoJsaogMVmuQT0YffECmxoidf0//yfbXn9wHo6Crq3aNw "Julia 1.0 – Try It Online")
[Answer]
# C, 96 bytes
```
float f(char*s){int i=66,l[256]={};for(;*s;)l[1+*s++&~32]=1;for(;i<92;*l+=l[i++]);return*l/26.;}
```
[Try it online!](https://tio.run/##fY3RToMwFIbv9xRHdAttcWYYSUwl88KoD@AdYNKVdqsrLRZQEdmrI5vXcm7@5Hx//o9fbjkfBqktq0H6fMccrlCnTA0qjqJAJ@FNlMVdT6V1PsUVRTpZEVwRsjhch1m8@gPq7jakWJNYJ4qQDFEn6sYZrK/CaEn74ThYMGV8NOtmMF7pxpf0vblMjReMai/1HlQOrW2gbOpjOjCsEKAM1DsBT3ajRQ1WwqNyIoBn5ly7Tj0YGav2IgfOdKHbpYcQ/UfxMnbfG8X3sHH204C0X/DWFGUF9kO4k0az7xZyu51YuT@/mL8u8PpsotP99IcJfEL98As)
[Answer]
# [Perl 5](https://www.perl.org/) `-MList::Util=uniq -p`, 24 bytes
```
$_=uniq(lc=~/[a-z]/g)/26
```
[Try it online!](https://tio.run/##Hc2xCgIxDADQX8ngoEMpCDocHE6Cgzc6iUg9YxuoTb2kCg5@uhF8P/AqTnllNjv3rdBjnsf@44/BvU8@LvxybbbjF9zbmIBvoAlhW2ImSRByTeGCCldGgQCRnlhAdKISoQluvlyVuIi5YU@iXXdQyv/FXP0B "Perl 5 – Try It Online")
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 9 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
░║üy$}╙+C
```
[Run and debug it](https://staxlang.xyz/#p=b0ba8179247dd32b43&i=%22Did+you+put+your+name+in+the+Goblet+of+Fire,+Harry%3F%22+he+asked+calmly.%0AThe+quick+brown+fox+jumps+over+the+lazy+dog%0A%21%40%23%24%25%5E%26*%28%29%0A%22%22&a=1&m=2)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 bytes
```
ŒuØAe€Æm
```
[Try it online!](https://tio.run/##y0rNyan8///opNLDMxxTHzWtOdyW@///fyWXzBSFyvxShYLSEhBdpJCXmJuqkJmnUJKRquCen5STWqKQn6bgllmUqqPgkVhUVGmvpACUSizOTk1RSE7Myc2p1AMA "Jelly – Try It Online")
### Explanation
```
Œu       | Convert to upper case
  ØAe€   | Check whether each capital letter is present, returning a list of 26 0s and 1s
      Æm | Mean
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 45 bytes
```
s=>~-s.match(/$|([a-z])(?!.*\1)/ig).length/26
```
[Try it online!](https://tio.run/##Xcy9CsIwFEDh3ae4gmAitEUHF6lOgg/gpg4x3ibRNLf2pvUH8dVrdXQ98J2zahXr2lUxCXTCrsg7zpfvhNNSRW1FNnqJnUqeBylWw3Syn8rMGZl6DCbabDbvNAUmj6knIwox3tANykZboAKiRVgH4x1bUL6y6ogRToQMCoxrMQDH2gUDDeNqLOXg77Xt/bVx@gLHmm4BCrrDuSkrBmqx/u29ej76pen14p9/W/cB "JavaScript (Node.js) – Try It Online")
---
# [JavaScript (Node.js)](https://nodejs.org), 47 bytes
```
s=>(s.match(/([a-z])(?!.*\1)/ig)||[]).length/26
```
[Try it online!](https://tio.run/##XcyxDoIwEIDh3ac4J1sTITq4GHUy8QHclKGWo62WHnIFlfjuiI6sf/L9N9Uq1rWr4iJQjn2x7Xm7E5yUKmorUnFWiy6TYj9N5pelTJ2Rn885k4nHYKJNV@teU2DymHgyohCzIz2hbLQFKiBahEMw3rEF5SurrhghJ2RQYFyLATjWLhhoGPczKSej12nwj8bpO1xregYo6AW3pqwYqMX6v/eqew9LM@jNmP9a/wU "JavaScript (Node.js) – Try It Online")
[Answer]
# Swift 5.9, ~~105~~ 100 bytes
```
var p={(s:String)in Float((65...90).filter{s.uppercased().map(\.asciiValue).contains($0)}.count)/26}
```
Using `Float` instead of `Double` saved a byte.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 9 bytes
```
;CoU Ê/26
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=O0NvVSDKLzI2&input=IkhvdyBtdWNoIG9mIHRoZSBFbmdsaXNoIGFscGhhYmV0IGRvZXMgYSBnaXZlbiBzdHJpbmcgdXNlPyI)
```
;CoU Ê/26     :Implicit input of string U
;C            :Lowercase alphabet
  oU          :Remove the characters not included in U, case insensitive
     Ê        :Length
      /26     :Divide by 26
```
[Answer]
# [Python 2](https://docs.python.org/2/), 57 bytes
```
lambda i:len(set(o for o in i.lower()if o.isalpha()))/26.
```
[Try it online!](https://tio.run/##rY9NSwMxEIbv/orX@pFEZYUeeijYehD1B3gsQrabuLHZTJxkrfHPr1sRhXoSPA3MzPPMO7HklsJ0sFerweuubjTc3Jsgk8mSYIlBcAGu8rQ1LJWzoMol7WOrpVLqcjqrhsguZIjJjWtQqEfs864ygu7MDs@twR3V3mSQxa1jc4F7zVyWE4wjnTamwVr7zpcKiwUEzpEySyv/SSqUGpViFcTBV9iHceWld@sNaqZtGF99w3PfxQR6Nfwp9/q9oKGnvUR/IH@fvT46Pnk8PVse7km/@z/I8AE "Python 2 – Try It Online")
A bit longer than the [Python 3 answer from ArBo](https://codegolf.stackexchange.com/a/187210/56555) but posted as a different approach in Python 2 anyway.
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-n`, ~~38~~ 34 bytes
-4 bytes from @historcrat!
```
p (?A..?Z).count{|c|~/#{c}/i}/26.0
```
[Try it online!](https://tio.run/##HYzLDgExGEb3nuIzLkHoiIXtkAgewMpC0ukUZab/6LSo26Ory@ok5yTHuNSHUKKTTBlL1l0myGl7f4jHK27cxTNWz3g0ZsMQopnK4MmhdPZHA80LCaVh9xILSnNpQVvMlZF9LLkxPonwTbw6ygyC50XuWW31NSenxBGpoYvGlq44uKKsQGdp/q@c3zwy2tWiSaPZ2rR7ST16U2kV6SoM9Ac "Ruby – Try It Online")
[Answer]
# C, 95 bytes
```
f(char*s){int a[256]={},z;while(*s)a[*s++|32]=1;for(z=97;z<'z';*a+=a[z++]);return(*a*100)/26;}
```
(note: rounds down)
### Alternate decimal-returning version (95 bytes):
```
float f(char*s){int a[256]={},z;while(*s&&a[*s++|32]=1);for(z=97;z<'z';*a+=a[z++]);return*a/26.;}
```
This borrows some from @Steadybox' answer.
]