text:
Find the Block on the Extended Periodic Table Using the Diagonal Rule
The periodic table gets its shape from the arrangement of elements into blocks:

An element is assigned its block based on what type of orbital holds its valence electron(s). For instance, the sole valence electron of neutral hydrogen occupies the 1s orbital in the 1s subshell, and so hydrogen belongs to the s-block.
The least energetic subshell is the 1s subshell, followed by 2s, 2p, 3s, etc. Electrons fill orbitals in less-energetic subshells first, in accordance with the following chart:

The diagonal arrows give the diagonal rule its name.
When finding the block of an element, there are some important facts to consider:

Each subsequent element has one more electron than its predecessor.

Every new type of subshell (s, p, d . . . ) can hold four more electrons than its predecessor as a consequence of the presence of two additional orbitals.

All subshells (1s, 2s . . . ) have an odd number of orbitals, each of which can hold two electrons. As such, all subshells can hold twice an odd number of electrons.

Subshells beyond s, p, d and f have names reserved for their eventual observation: after f comes the rest of the alphabet, starting with g and omitting j.

The Challenge
Given the atomic number of an element, output its block (a letter).
Because one can tell how many electrons are held by theorized, not-yet-observed subshells, input will be less than or equal to 17296 (found with the sum \$2\sum_{n=1}^{23}\sum_{\ell=0}^{n-1}2\left(2\ell+1\right)\$), the atomic number of the last element with valence electrons in the 46s subshell. Letters beyond z would be needed for elements past that point, and so they will not be included in the challenge. An extended version of the diagonal line chart above can be seen here.
Rules

This is code-golf so the shortest answer in bytes in each language wins

For the purpose of this challenge, when s and p are reached a second time after f, they will be capitalized. This means letters are sequenced as follows: s p d f g h i k l m n o P q r S t u v w x y z. Additionally, it means output is case-sensitive.

Assume only valid input is given.

There is a discrepancy between the periodic table above and the expected output: in reality, lanthanum and actinium (57 and 89) are in the d-block, and lutetium and lawrencium (71 and 103) are in the f-block. The diagonal rule implies that lanthanum and actinium are in the f-block, and that lutetium and lawrencium are in the d-block, and so that is what the program should state.

Test Cases
In: 1
Out: s

In: 5
Out: p

In: 21
Out: d

In: 57
Out: f

In: 2784
Out: l

In: 17296
Out: s

In: 15181
Out: z

In: 12024
Out: q

Shouldn't 2784 be l?

@KevinCruijssen That is correct, thank you for telling me. Also, 12024 is q like you pointed out elsewhere

05AB1E, 46 bytes
[N4*Ìˆ¯O·-Ð1‹#U}A3.$„sp©Du‡®ì„ejмÁ¯.sOX<¯O%›Oè

Port of @Neil's Charcoal answer, so make sure to upvote him as well!
Try it online or verify all test cases.
Explanation:
[                    # Start an infinite loop:
 N4*                 #  Multiply the (0-based) loop-index by 4
    Ì                #  Increase it by 2
     ˆ               #  Pop and add this value to the global array
 ¯O                  #  Get the sum of the global array
   ·                 #  Double this sum
    -                #  Subtract it from the current integer,
                     #  which will be the (implicit) input in the first iteration
     Ð               #  Triplicate this new value
      1‹             #  If it's 0 or negative:
        #            #   Stop the infinite loop
      U              #  Pop and store the triplicated value in variable `X`
                     #  (which is 1 by default, which doesn't matter for inputs ≤ 4)
}A                   # After the infinite loop: push the lowercase alphabet
  3.$                # Remove the leading "abc"
     „sp             # Push string "sp"
        ©            # Store it in variable `®` (without popping)
         D           # Duplicate "sp"
          u          # Uppercase the copy: "SP"
           ‡         # Transliterate "s" to "S" and "p" to "P"
            ®ì       # Prepend "sp" from variable `®`
              „ejм   # Remove "e" and "j"
                  Á  # Rotate it once towards the right
                     # (we now have the string "zspdfghiklmnoPqrStuvwxy")
 ¯.s                 # Get a list of suffices of the global array
    O                # Sum each inner suffix
     X<              # Push value `X`, and decrease it by 1
       ¯O%           # Modulo it by the sum of the global array
          ›          # Check for each prefix-sum if it's larger than this value
                     # (1 if truthy; 0 if falsey)
           O         # Get the amount of truthy values by summing
 è                   # And use it to (0-based) index into the string
                     # (after which the resulting character is output implicitly)

Charcoal, 59 bytes
Ｎθ⊞υ²Ｗ›θ⊗Συ«≧⁻⊗Συθ⊞υ⁺⁴⌈υ»§”>-◧βYTＢ↷p{ï⭆Σ]¬∕↷›”ＬΦυ‹﹪⊖θΣυΣ✂υκ

Try it online! Link is to verbose version of code. Explanation:
Ｎθ

Input the atomic number.
⊞υ²

Start with just an s-shell.
Ｗ›θ⊗Συ«

Repeat while the number of electrons left will fill all the shells twice...
≧⁻⊗Συθ

... remove those electrons, and...
⊞υ⁺⁴⌈υ

... add another shell which can hold 4 more electrons than the previous.
»§”>-◧βYTＢ↷p{ï⭆Σ]¬∕↷›”ＬΦυ‹﹪⊖θΣυΣ✂υκ

Count how many of the remaining shells have no electrons and look that up in the compressed string of block letters. (Because of the way Sum works in Charcoal, the calculation is adjusted slightly to avoid a sum of no elements, which ends up offsetting the result by 1, which is compensated by moving the z to the beginning of the string where it can be cyclically indexed.)

@KevinCruijssen No, because that breaks for equal values. But it turns out I had to do that anyway because the previous code was buggy and I had to subtract 1 to fix that (costing a byte) but then fortunately I do now want Less inside the filter, thus balancing the bug fix.

Yeah, I deleted my comment when I noticed that. Btw, you forgot to update your TIO after your fix just yet.

@KevinCruijssen Yes, I noticed when I went to see whether it affected 17296 or 2784. BTW that fix was for 12, which was resulting in p instead of s.

Hmm, 12024 now results in q instead of P. Again, not sure if the test cases are wrong or our implementations..

J, 64 bytes
-4 for 12024 being q
('spdfghiklmnoPqrStuvwxyz'{~]{~[I.~[:+/\2+4*])&(;2#</.99|i.2#99)

Try it online!
How it works
99|i.2#99

Create a 99x99 matrix where each row counts up: 0 1 2 3 …
;2#</.

Take each diagonal 0;1 0;2 1 0 two times: 0 0 1 0 1 0 2 1 0 2 1 0 ….
[:+/\2+4*]

Multiply each number by 4, add 2, add each number left to it: 2 4 10 12 18 20 30 …
[I.~

Use this as range boundaries to find the index for the input, e.g. 13.
]{~

Get the corresponding shell at that index, e.g. 1.
'spdfghiklmnoPqrStuvwxyz'{~

Retrieve the shell name.

make it 60

58


text:
Pascal's tree-angle
Print this tree:
           1
         1 2 1
        1 3 3 1
       1 4 6 4 1
     1 5 10 10 5 1
        15 20 15
    7 21 35 35 21 7
   8 28 56 70 56 28 8
9 36 84 126 126 84 36 9
          252
        462 462
          924
       1716 1716

This is code-golf, so shortest code in chars wins!

Related: Pascal's triangle

With the leading spaces or doesn't it matter?

No, it doesnt matter

J, 67 bytes
(1785951#:~13#7)(0(,~' '#~12-<.@-:@#)@":-@[}.}.)&>1;2}.<@(!{:)\i.14

The pascal's triangle part is adapted from @ephemient's answer here.
Try it online!
How it works
<@(!{:)\i.14

The first 14 rows of the triangle.
1;2}.

Drop the first two rows, prepend 1.
(1785951#:~13#7)

0 0 0 0 0 2 1 1 1 5 5 6 6 stored in base 7.
":-@[}.}.)&>1

Unbox, drop the first N and last N elements from each row, where N is the corresponding item from the base 7 array before.
0(…)@":

Convert each row to string and …
12-<.@-:@#

Count its length, halve and round it down.
,~' '#~

Prepend that amount of spaces before each row.

Is there a way I can learn this coding language, it seems interesting

@NipDip The J website has many resources.  There is the J primer, J for C Programmers, and Learning J, among much other content on the Wiki.

ok, thanks for the tip

Python 2, 118 bytes
n=1
exec"a=n/6+n/10*4+(n==6);print' '.join(str(((2**n+1)**n>>n*k)%2**n)for k in range(a,n+1%n-a)).center(23);n+=1;"*13

Try it online!
Expresses binomial coefficients inline like in my tip here with binom(n,k)=((2**n+1)**n>>n*k)%2**n. The number of entries cut off on each side for the n'th row (one-indexed) is expressed as n/6+n/10*4+(n==6). For the first row, one additional entry on the right is cut off.
Here's a slightly more readable version without an exec so that the syntax highlighting works:
119 bytes
n=1
while n<14:a=n/6+n/10*4+(n==6);print' '.join(str(((2**n+1)**n>>n*k)%2**n)for k in range(a,n+1%n-a)).center(23);n+=1

Try it online!

05AB1E, 26 bytes
13LεDÝc•6hö¢ðU•RNèF¦¨]»¦.c

Try it online.
Explanation:
13L            # Push a list in the range [1,13]
   ε           # Map each value `y` to:
    D          #  Duplicate the value `y`
     Ý         #  Pop and push a list in the range [0,`y`]
      c        #  Take the binomial coefficient of `y` with each value in this list
               #  (we now have the 0-based `y`'th Pascal row)
    •6hö¢ðU•   #  Push compressed integer 6655111200000
            R  #  Reverse it to "0000021115566"
    Nè         #  Index the map-index into it to get the `N`'th digit
      F        #  Loop that many times:
       ¦¨      #   Remove both the first and last item of the current Pascal row list
   ]           # Close both the inner loop and map
    »          # Join each inner list by spaces, and then each string by newlines
     ¦         # Remove the leading 1 on the very first line
      .c       # Left-focused centralize the newline-delimited string
               # (after which the result is output implicitly)

See this 05AB1E tip of mine (section How to compress large integers?) to understand why •6hö¢ðU• is 6655111200000.

JavaScript (ES8), 137 bytes
_=>[a=[1],..."000021115566"].map((v,n)=>(s=(a=[i=1,...a.map(v=>v+~~a[i++])]).slice(v,n+2+!n-v).join` `).padStart(23+s.length>>1)).join`
`

Try it online!

Charcoal, 57 bytes
Ｆ³⊞υ﹪ι²Ｆ”)⧴→↨w﹪f”«ＵＭυ⁺κ§υ⊖λ⊞υ⁰Ｆ›ⅉ⁰≔⪫✂υＩι±Ｉι¹ ι⟦⁺× ⊘⁻²⁴Ｌιι

Try it online! Link is to verbose version of code. Explanation:
Ｆ³⊞υ﹪ι²

Start by preparing a list 0 1 0. (Charcoal's indexing is cyclic, so rather than letting it wrap I need to provide a safety margin.)
Ｆ”)⧴→↨w﹪f”«

Loop over the compressed string 111113222667 which represents the number of entries to slice off each side (except on the first iteration).
ＵＭυ⁺κ§υ⊖λ

Add each element to the next element (so the first element remains 0).
⊞υ⁰

Append another 0 to the end. (This is done here so that it can be easily sliced off again.)
Ｆ›ⅉ⁰≔⪫✂υＩι±Ｉι¹ ι

Except on the first loop, slice off the given number of entries from the start and the end (this has to be nonzero to work, which is why we already pushed the 0 only to slice it off again, and also why we have an extra 0 at the start, which otherwise wouldn't be necessary). On the first loop, the 1 just ends up being the output string.
⟦⁺× ⊘⁻²⁴Ｌιι

Centre the string in a width of 24 (23 would round the sixth and eighth lines down which is not what we want) and output each string on its own line.

///, 196 bytes
/h/ 3//g/ 2//f/ 1//e/aa//d/
a//c/  //b/ea//a/c /bc1bc
b1gfbdac1hhfecdaf 4 6 4fe dc1 5f0f0 5facdac15g0f5e d 7g1h5h5g1 7a d8g8 56 70 56g8 8c
9h6 84f26f26 84h6 9
bg52b dac462 462ec
b 924b daf716f716e

Try it online!

Is this a direct print, or an algorithmic solution?

@Razetime Just direct print with many substitutions.

Ruby, 91 bytes
66551112000090.digits.map{|i|n=0;$*.map!{|j|n+n=j}<<1;puts ($*[i..~i]*' ').center 23if i<9}

Try it online!
Iterates over the digits of 66551112000090 (from the right), one digit for each row of the tree. Each digit, with the exception of the 9, specifies the number of elements to be omitted from the beginning and end of the corresponding row of Pascal's triangle. The 9 is a distinct digit used to suppress printing of the second row of the triangle.
The Pascal's triangle code is based on this answer by @manatwork, golfed further by abusing the predefined array $*. $* normally stores the list of command-line options. Since we use no command-line options, $* is initialised to the empty array.

Deadfish~, 1398 bytes
{i}{i}{i}ii{c}c{i}{i}dddc{d}{d}iii{c}c{d}{d}ddc{i}{i}iiccccccccc{i}{i}dddc{d}{d}iiic{i}{i}ddc{d}{d}iic{i}{i}dddc{d}{d}iiiccccccccc{d}{d}ddc{i}{i}iicccccccc{i}{i}dddc{d}{d}iiic{i}{i}dc{d}{d}ic{i}{i}dc{d}{d}ic{i}{i}dddc{d}{d}iiicccccccc{d}{d}ddc{i}{i}iiccccccc{i}{i}dddc{d}{d}iiic{i}{i}c{d}{d}c{i}{i}iic{d}{d}ddc{i}{i}c{d}{d}c{i}{i}dddc{d}{d}iiiccccccc{d}{d}ddc{i}{i}iiccccc{i}{i}dddc{d}{d}iiic{i}{i}ic{d}{d}dc{i}{i}dddcdc{d}ddddddc{i}{i}dddcdc{d}ddddddc{i}{i}ic{d}{d}dc{i}{i}dddc{d}{d}iiiccccc{d}{d}ddc{i}{i}iicccccccc{i}{i}dddciiiic{d}{d}dc{i}{i}ddcddc{d}ddddddc{i}{i}dddciiiic{d}{d}dccccccc{d}{d}ddc{i}{i}iicccc{i}{i}iiic{d}{d}dddc{i}{i}ddcdc{d}{d}iiic{i}{i}dciic{d}{d}dc{i}{i}dciic{d}{d}dc{i}{i}ddcdc{d}{d}iiic{i}{i}iiic{d}{d}dddcccc{d}{d}ddc{i}{i}iiccc{i}{i}iiiic{d}{d}ddddc{i}{i}ddciiiiiic{d}{d}ddddc{i}{i}icic{d}{d}ddc{i}{i}iiic{d}iiic{d}ddddddc{i}{i}icic{d}{d}ddc{i}{i}ddciiiiiic{d}{d}ddddc{i}{i}iiiic{d}{d}ddddcc{d}{d}ddc{{i}ddddd}dddc{d}{d}dddddc{i}{i}dciiic{d}{d}ddc{i}{i}iiiicddddc{d}{d}c{i}{i}dddciciiiic{d}{d}ddc{i}{i}dddciciiiic{d}{d}ddc{i}{i}iiiicddddc{d}{d}c{i}{i}dciiic{d}{d}ddc{i}{i}iiiiic{{d}iiiii}iiic{i}{i}ii{c}{i}{i}ddciiicdddc{d}{d}ii{c}{d}{d}ddc{i}{i}iicccccccc{i}{i}ciicddddc{d}{d}iic{i}{i}ciicddddc{d}{d}iicccccccc{d}{d}ddc{i}{i}ii{c}{i}{i}iiiiic{d}iiiciic{d}{d}{c}{d}{d}ddc{i}{i}iiccccccc{i}{i}dddciiiiiicddddddciiiiic{d}{d}ddc{i}{i}dddciiiiiicddddddciiiiic{d}{d}ddccccccc

Try it online!
I tried to fail, and I succeeded!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Laguerre Polynomials
Laguerre polynomials are nontrivial solutions to Laguerre's equation, a second-order linear differential equation: \$xy''+(1-x)y'+ny=0\$. For a given value of \$n\$, the solution, \$y\$, is named \$L_n(x)\$. To avoid trivial solutions, the polynomials are non-constant except for \$n=0\$.
The polynomials can be found without calculus using recursion:
\$L_0(x)=1\$
\$L_1(x)=1-x\$
\$L_{k+1}(x)=\frac{(2k+1-x)L_k(x)-kL_{k-1}(x)}{k+1}\$
Summation can be used to the same end:
\$L_n(x)=\sum\limits_{k=0}^{n}{n\choose k}\frac{(-1)^k}{k!}x^k\$
\$L_n(x)=\sum\limits_{i=0}^n\prod\limits_{k=1}^i\frac{-(n-k+1)x}{k^2}\$
The first Laguerre polynomials are as follows:

Coefficients can be found here.
The Challenge
Given a nonnegative integer \$n\$ and a real number \$x\$, find \$L_n(x)\$.
Rules

This is code-golf so the shortest answer in bytes wins.

Assume only valid input will be given.

Error should be under one ten-thousandth (±0.0001) for the test cases.

Test Cases
Here, \$n\$ is the first number and \$x\$ is the second.
In: 1 2
Out: -1

In: 3 1.416
Out: -0.71360922

In: 4 8.6
Out: −7.63726667

In: 6 -2.1
Out: 91.86123261

I like that this challenge asks for the value of the polynomial on a certain input rather than its list of coefficients.

Thanks @xnor, it made more sense that way, being a polynomial and all

Doesn't 1 2 give -1 rather 1, since $L_1(x)=1-x$?

it is fixed now

Computers can't possibly take real numbers as inputs.  What are the actual requirements for inputs of x?

I don't understand what you mean? Surely you have used real numbers as inputs in the past @AdHocGarfHunter

Or do you mean to point out that floats have limited precision? @AdHocGarfHunter

Ok, perhaps I could be clearer, computer programs can take real numbers as inputs, however since there more real numbers than binary strings there is no encoding scheme that can possibly allow a program to take an arbitrary real number as input. You have to limit it somehow.  Floats are one way, rationals are another with arbitrary precision.

The point of writing "real" was to imply that the imaginary part of the input is always 0. Any real number can be approximated by a rational number by the limiting process because Q is a dense set. To change the word "real" to "rational" is unnecessary. @AdHocGarfHunter

So a rational number is fine?  That is really just my question.

Certainly @AdHocGarfHunter

Another useful fact about Laguerre polynomials:  $$ L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n}( e^{-x} x^n) $$

You and the Wikipedia page might have left something out in the explanation

@Hippopotomonstrosesquipedalian Fixed, I think

I have edited the Wikipedia page to exclude the $y=0$ solution.

MATL, 5 bytes
_1iZh

Inputs are \$n\$, then \$x\$. Try it online! Or verify all test cases.
How it works
This uses the equivalence of Laguerre polynomials and the (confluent) hypergeometric function:
\$
L_n(x) = {} _1F_1(-n,1,x)
\$
_    % Implicit input: n. Negate
1    % Push 1
i    % Input: x
Zh   % Hypergeometric function. Implicit output

Python 2, 53 bytes
f=lambda n,x:n<1or((2*n-1-x)*f(n-1,x)-~-n*f(n-2,x))/n

Try it online!

Outputs True if n=0

@fireflame241 Since True is basically the same as 1 in Python, this is allowed. See this meta post for details.

52 bytes in Python 3.8.

Wolfram Language (Mathematica), 9 bytes
LaguerreL

Try it online!

7 bytes: lagrrel

Wow, I did not expect a built-in to be golfable.

lagrrel works on WolframAlpha but not in Mathematica.

oh darn, I thought WA and mathematica were identical

Jelly,  11  10 bytes
ŻṚṀc÷!ƲḅN}

A dyadic Link accepting \$n\$ on the left and \$x\$ on the right which yields \$L_n(x)\$.
Try it online!
How?
This makes the observation that
\$L_n(x)=\sum\limits_{k=0}^{n}{n\choose k}\frac{(-1)^k}{k!}x^k=\sum\limits_{k=0}^{n}{(-x)^k}\frac{n\choose k}{k!}\$
which is the evaluation of a base \$-x\$ number with n+1 digits of the form \$\frac{n\choose k}{k!}\$.
ŻṚṀc÷!ƲḅN} - Link: n, x
Ż          - zero-range (n) -> [0, 1, 2, ..., n]
 Ṛ         - reverse -> [n, ..., 2, 1, 0]
      Ʋ    - last four links as a monad - f(I=that):
  Ṁ        -   maximum -> n
   c       -   {that} binomial (I) -> [nCn, ..., nC2, nC1, nC0]
     !     -   {I} factorial -> [n!, ..., 2!, 1!, 0!]
    ÷      -   division -> [nCn÷n!, ..., nC2÷2!, nC0÷0!]
        N} - negate right argument -> -x
       ḅ   - convert from base (-x) -> -xⁿnCn÷n!+...+-x²nC2÷2!+-x¹nC1÷1!+-x°nC0÷0!

JavaScript (ES6),  48 42  41 bytes
Expects (x)(n). May output true instead of 1.
x=>g=k=>k<1||((x-k---k)*g(k)+k*g(k-1))/~k

Try it online!

Python 3.8 (pre-release), 66 bytes
L=lambda n,x:((2*n-1-x)*L(d:=n-1,x)-d*L(n-2,x))/n if n>1else 1-n*x

Try it online!
Direct implementation of the recursive algorithm, with one interesting part: L(1,x) and L(0,x) can be combined as L(n,x)=1-n*x.
Could save 2 bytes using L=lambda n,x:n>1and((2*n-1-x)*L(d:=n-1,x)-d*L(n-2,x))/n or 1-n*x, but L(n) is not necessarily zero.

APL (Dyalog Unicode), 16 bytes
1⊥⍨0,⎕×(-÷⌽×⌽)⍳⎕

Try it online!
A full program that takes n and x from two separate lines of stdin.
How it works
1⊥⍨0,⎕×(-÷⌽×⌽)⍳⎕
              ⍳⎕  ⍝ Take n and generate 1..n
       (-÷⌽×⌽)    ⍝ Compute i÷(n+1-i)^2 for i←1..n
   0,⎕×           ⍝ Multiply x to each and prepend 0, call it B
1⊥⍨               ⍝ Convert all ones from base B to single number

The mixed base conversion looks like this:
1..n:                ... n-3          n-2          n-1          1
B:            0      ... (n-3)x/4^2   (n-2)x/3^2   (n-1)x/2^2   nx
digits:       1      ... 1            1            1            1
digit values: x^n/n! ... (nC3 x^3/3!) (nC2 x^2/2!) (nC1 x^1/1!) (nC0 x^0/0!)

It is essentially a fancy way to write the sum of product scan over 1, nx, (n-1)x/2^2, (n-2)x/3^2, .... This happens to be shorter than a more straightforward -x-base conversion (evaluating a polynomial at -x):
APL (Dyalog Unicode), 18 bytes
(-⎕)⊥⌽1,(!÷⍨⊢!≢)⍳⎕

Try it online!

Functional version: 1⊥⍨0,×∘(-÷⌽×⌽)∘⍳

Python 3.8 (pre-release), 61 bytes
L=lambda k,x:k<1or[1-x,L(w:=k-1,x)*(k+w-x)-L(k-2,x)*w][k>1]/k

Try it online!

JavaScript (Node.js), 36 bytes
x=>(i=0,g=n=>n?1-x*n/++i/i*g(n-1):1)

Try it online!
Just convert the formula to this, and use recursive:
$$ L_n(x) = \sum_{i=0}^n\prod_{k=1}^i\frac{-(n-k+1)x}{k^2} $$

J, 37 20 bytes
-5 thanks to @Bubbler
Calculates the polynomial adapted from the summation formula and uses J's p. operator to calculate that polynomial with a given x.
(p.-)~i.((!]/)%!)@,]

Try it online!
J, 45 byte
Alternative Recursive function.
1:`-@.[~ ::((>:@]%~($:*[-~1+2*])-]*($:<:))<:)

Try it online!
How it works
We define a hook (fg), which is x f (g n). f is (p.-)~ so it will be evaluated as ((i.((!]/)%!)@,]) n) p. (- x).
(p.-)~i.((!]/)%!)@,]
      i.         @,] enumerate 3 -> 0 1 2, append 3 -> 0 1 2 3, …
         (!]/)       3 over i
              %      divided by
               !     !i
   -                 negate x
 p.                  apply -x to the polynomial expressed in J as
                     1 3 1.5 0.166667, so 1-3(-x)+1.5(-x)^2+0.16(-x)^3

Top solution can be golfed to 20 bytes.

@Bubbler all great tips I never would have thought of. Thanks!

Pari/GP, 39 bytes
Using the formula \$L_n(x)=\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!} x^k\$.
l(n,x)=sum(k=0,n,n!*(-x)^k/(n-k)!/k!^2)

Try it online!

Pari/GP, 45 bytes
Using the generating function \$\sum_{n=0}^\infty x^n L_n(t)= \frac{1}{1-x} e^{-xt/(1-x)}\$.
l(n,t)=Vec(exp(-x*t/(1-x)+O(x^n++))/(1-x))[n]

Try it online!

C (gcc), 91 bytes
i;k;float f(n,x)float x;{float p,s=0;for(i=++n;k=i--;s+=p)for(p=1;--k;)p*=(k-n)*x/k/k;x=s;}

Try it online!
Straighforward implementation of polynomial expansion. Slightly golfed less
i;k;
float f(n,x)float x;{
  float p,s=0;
  for(i=++n;k=i--;s+=p)
    for(p=1;--k;)
      p*=(k-n)*x/k/k;
  x=s;
}

Charcoal, 29 bytes
⊞υ¹ＦＮ⊞υ×⌈υＬυＩ↨Ｅυ∕⌈υ×ιＸ§⮌υκ²±Ｎ

Try it online! Link is to verbose version of code. Uses a slightly modified version of the summation given in the question. Explanation:
⊞υ¹ＦＮ⊞υ×⌈υＬυ

Calculate the factorials from \$0!\$ to \$n!\$.
Ｉ↨Ｅυ∕⌈υ×ιＸ§⮌υκ²±Ｎ

For each index \$i\$ from \$0\$ to \$n\$ calculate \$\frac{n!}{i!(n-i)!^2}\$ and then perform base conversion from base \$-x\$ which multiplies each term by \$(-1)^{n-i}x^{n-i}\$ and takes the sum.
If we set \$k=n-i\$ we see that we calculate \$\sum\limits_{k=0}^{n}{\frac{n!(-1)^k}{(n-k)!k!^2}x^k}=\sum\limits_{k=0}^{n}{n\choose k}\frac{(-1)^k}{k!}x^k\$ as required.

05AB1E, 16 11 bytes
DÝR©c®!/I(β

Port of @JonathanAllan's Jelly answer, so make sure to upvote him as well!
Try it online or verify all test cases.
Original 16 bytes answer:
1λèN·<I-₁*N<₂*-N/

Try it online or verify all test cases.
Explanation:
D                 # Duplicate the first (implicit) input-integer `n`
 Ý                # Pop one, and push a list in the range [0,n]
  R               # Reverse it to range [n,0]
   ©              # Store this list in variable `®` (without popping)
    c             # Get the binomial coefficient of `n` and each value in this list
     ®!           # Push list `®` again, and get the factorial of each
       /          # Divide the values at the same positions of the two lists
        I(        # Push the second input `x`, and negate it
          β       # Convert the list from base-(-x) to a single decimal value
                  # (which is output implicitly as result)

Uses the recursive formula:
$$a(n)=\frac{a(n-1)\times(2n-1-x)-(n-1)\times a(n-2)}{n}$$
 λ                # Create a recursive environment
  è               # to get the 0-based n'th value afterwards
                  # (where `n` is the first implicit input)
                  # (which will be output implicitly as result at the end)
1                 # Starting with a(-1)=0 and a(0)=1,
                  # and for every other a(N), we'll:
                  #  (implicitly push a(N-1))
   N·             #  Push `N` doubled
     <            #  Decrease it by 1
      I-          #  Decrease it by the second input `x`
        *         #  Multiply it by the implicit a(N-1)
         N<       #  Push `N`-1
           ₂*     #  Multiply it by a(N-2)
             -    #  Decrease the a(N-1)*(2N-1-x) by this (N-1)*a(N-2)
              N/  #  And divide it by `N`: (a(N-1)*(2N-1-x)-(N-1)*a(N-2))/N

Japt -x, 28 27 26 bytes
ò@l *VpX /Xl ²*JpX /(U-X l

Try it
Japt, 30 29 28 bytes
ò x@l *VpX /Xl ²*JpX /(U-X l

Try it
Explanation
ò x@l *VpX /Xl ²*JpX /(U-X l
ò                               // Create a array [0, 1, ..., U]
  x                             // sum the array after mapping through
   @                            // Function(X)
    l                           //    U!
      *VpX                      //    times V ** X
           /Xl ²                //    divided by X! ** 2
                *JpX            //    times (-1) ** X
                     /(U-X l    //    divided by (U - X)!

U is the first input
V is the second input
** represents exponentiation
! represents factorial

Fortran (GFortran), 69 68 bytes
read*,n,a
print*,sum([(product([((j-n-1)*a/j/j,j=1,i)]),i=0,n)])
end

-1 byte thanks to @ceilingcat
The program reads in an implicit integer n and real a. Summation and product operations are performed using arrays (initialized using implicit loops) with the intrinsics sum() and product().
Try it online!

Scala, 81 bytes
Use the recursive formula of Laguerre Polynomials.

Golfed version. Try it online!
def f(n:Int,x:Double):Double={if(n<1)1 else((2*n-1-x)*f(n-1,x)-(n-1)*f(n-2,x))/n}

Ungolfed version. Try it online!
object Main {
  def f(n: Int, x: Double): Double = {
    if(n < 1) 1
    else ((2*n - 1 - x) * f(n - 1, x) - (n - 1) * f(n - 2, x)) / n
  }

  def main(args: Array[String]): Unit = {
    println(f(1, 2.0))
    println(f(3, 1.416))
    println(f(4, 8.6))
    println(f(6, -2.1))
  }
}

HTML, 1 Byte, Invalidated by newest edit.

0

\$y=0\$ is a solution to the equation stated in the question for all \$x\$ and \$n\$.

The question seems to require a Laguerre Polynomial rather than any solution to Laguerre's equation. The question could be more explicit I guess, but I'm not sure you'll get any upvotes for this, more likely you are just risking downvotes :( (FWIW 0 bytes in Jelly and some other languages most likely).

@JonathanAllan "In mathematics, the Laguerre polynomials, named after Edmond Laguerre (1834–1886), are solutions of Laguerre's differential equation". 0 is a solution to Laguerre's differential equation, and is therefore a Laguerre polynomial.

@Hippopotomonstrosesquipedalian I specified solutions should be nontrivial (nonconstant except for n=0), hopefully that fixes it

Smart thinking, but the existing rule "Error should be under one ten-thousandth (±0.0001) for the test cases." already invalidates this approach even before @golf69's latest edit.

Jelly, 0 Bytes, invalidated by newest edit

Try it online! Note that \$y=0\$ is a solution for all \$x\$ and \$n\$. Port of my HTML answer.
Thanks to Jonathan Allen for pointing out this port, and also that this might be a polyglot.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Print om sign with pi
This time I will give you an easy challenge:
Print the Om sign with \$\pi\$!(Sorry for many challenges with \$\pi\$)
Here is the om sign drawn using pi numbers:
            59  0  64
              230781
3.14159
      26      502884
     535 83279     1971
   89 433              6939
       79    44         937
       323    749     510
    84            58209
626

Here is the sequence I used to order the numbers of \$\pi\$:

Rules

There will be no input(except it has to be)
The program should print the sign to STDOUT
Its's code-golf, so the shortest code in bytes wins!
You must include all the spaces and line breaks in the original text.

Good luck

Is it kolmolgorov complexity?

@Third-party'Chef' What is kolmolgorov complexity?

[kolmogorov-complexity] is a tag for challenges that have no input and a fixed output. The name comes from theoretical computer science.

@Third-party'Chef' Yes it is. I added the tag.

Looks pretty boring. Can anyone beat Bubblegum?

We need to output that exact text?  This could be a lot clearer in the question

@user202729 How many bytes is that anyway? By comparison, Charcoal's compression takes 85 bytes.

@Neil I got 85 bytes in Bubblegum (zopfli) as well.

@Ad Yes your right

After this post, someone is downvoting All my posts. Please add a comment why it'a happening so.

@Tanmay This will never happen. Serial-downvoting will be cancelled automatically by the system.

05AB1E, 91 bytes
•Eó£ƵZ₃|ã
xWм7qèý`ÚA¿нÏ9,ÖcPÇŸ›ÎŸt¤,,ûUÅ¨ù—¤ï`ÿ¾ζ@η@••7¼P•в•pÏ{ʒÂfĆ¨¿ZF•15вú•DŠ\•4в£»31DT/:

Try it online.
Explanation:
•Eó£ƵZ₃|ã
xWм7qèý`ÚA¿нÏ9,ÖcPÇŸ›ÎŸt¤,,ûUÅ¨ù—¤ï`ÿ¾ζ@η@•
                 # Push compressed integer 31746388586852694571167828992290814184914816000404856451284780420784056983357043462437313025051647834765116670748406087616
 •7¼P•           # Push compressed integer 502885
      в          # Convert the larger integer to base-502885 as list:
                 #  [59,0,64,230781,314159,26,502884,535,83279,1971,89,433,6939,79,44,937,323,749,510,84,58209,626]
•pÏ{ʒÂfĆ¨¿ZF•    # Push compressed integer 60230047425392376760356855
             15в # Convert it to base-15 as list:
                 #  [12,1,1,14,0,6,5,5,0,4,3,0,13,7,3,8,7,3,4,4,11,0]
ú                # Pad the integers in the first list with leading spaces,
                 # where the amount of spaces is that of the second list at the same indices:
                 #  ["            59"," 0"," 64","              230781","314159","      26","     502884","     535","83279","    1971","   89","433","             6939","       79","   44","        937","       323","   749","    510","    84","           58209","626"]
•DŠ\•            # Push compressed integer 880633
     4в          # Convert it to base-4 as list: [3,1,1,2,3,3,3,3,2,1]
       £         # Split the list of strings into parts of that size:
                 #  [["            59"," 0"," 64"],["              230781"],["314159"],["      26","     502884"],["     535","83279","    1971"],["   89","433","             6939"],["       79","   44","        937"],["       323","   749","    510"],["    84","           58209"],["626"]]
        »        # Join each inner list by spaces, and then each string by newlines
31               # Push 31
  D              # Duplicate it
   T/            # Divide the copy by 10: 3.1
     :           # Replace the "31" with "3.1" in the string
                 # (after which the result is output implicitly)

Note that all the leading spaces (except for the first integers in the line) are decreased by 1 because the » joins by spaces.
See this 05AB1E tip of mine (section How to compress large integers? and How to compress integer lists?) to understand how the compressed parts works.

Since I was curious, I also made a program using the actual PI-digits and drawing them in the specified pattern one by one using the Canvas builtin Λ. Which surprisingly enough is not that much larger (97 bytes):
2žs•3]]\´ë:O•23в£J•ΘüÁи‘•11в0šúS•2q₄BeçqÌÂ§ßI/ÖÅ?¨L×Σ₃ÛuÌÎvêmtTYx¡n‡¢lΛf4ÙI₁¿çÑv•9в.Λ46Â:„ 4„3..;

Try it online.
Explanation:
2            # Push a 2
žs           # Push an infinite list of PI digits: [3,1,4,1,5,...]
  •3]]\´ë:O• # Push compressed integer 243177533433411924
   23в       # Convert it to base-23 as list: [11,2,5,2,3,22,3,3,5,3,2,10,1]
      £      # Split the PI-digits into parts of that size
       J     # Join each inner list of digits together:
             #  [31415926535,89,79323,84,626,4338327950288419716939,937,510,58209,749,44,5923078164,0]
•ΘüÁи‘•      # Push compressed integer 342434478685
 11в         # Convert it to base-11 as list: [1,2,2,2,5,3,3,7,7,1,10,2]
    0š       # Prepend a 0: [0,1,2,2,2,5,3,3,7,7,1,10,2]
      ú      # Pad the strings with that many leading spaces to the integers:
             #  ["31415926535"," 89","  79323","  84","  626","     4338327950288419716939","   937","   510","       58209","       749"," 44","          5923078164","  0"]
       S     # And convert it to a flattened list of characters
•2q₄BeçqÌÂ§ßI/ÖÅ?¨L×Σ₃ÛuÌÎvêmtTYx¡n‡¢lΛf4ÙI₁¿çÑv•
             # Push compressed integer 1107440116348129217561550864085059321059233554362962027078200378907904337318203317830295973758995759889862300097
 9в          # Convert it to base-9 as list:
             #  [2,2,2,2,2,4,2,4,6,6,6,5,2,2,3,2,2,3,6,6,6,6,5,2,5,6,6,6,6,1,1,1,2,1,2,2,2,1,2,2,2,2,1,2,2,2,2,2,4,2,2,2,3,2,2,2,5,6,6,2,2,2,5,6,6,6,2,2,5,6,6,6,6,6,2,6,2,2,2,2,7,6,6,6,6,6,6,6,2,2,7,6,6,8,1,1,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,1,6,6,6,6]
.Λ           # Use the Canvas builtin with these three lists, where
             # - the 2 is the length of each line
             # - the list ["3","1","4",...," "," ","0"] are the characters to draw
             # - the list [2,2,2,...,6,6,6] are the directions
  46         # Push 46
    Â        # Bifurcate it (short for Duplicate & Reverse copy): 64
     :       # Replace the 46 with 64 in the string
  „ 4„3..;   # Replace the first " 4" with "3."
             # (after which the result is output implicitly)

See this 05AB1E tip of mine (section How to compress large integers? and How to compress integer lists?) to understand how the compressed parts works.
So we use the following options for the Canvas builtin:

\$a\$ length: 2 (all lines are of size 2; or basically 1 since they're overlapping previous lines)
\$b\$ the characters we want to display, which are the digits of PI with the spaces we added to travel around
\$c\$ the directions, where 8 is a reset to the origin where we started, and the other directions are:

7   0   1
  ↖ ↑ ↗
6 ← X → 2
  ↙ ↓ ↘
5   4   3

Here some of the first steps:
char: 3; direction: 2→
3

char: 1; direction: 2→
31

char: 4; direction: 2→
314

char: 1; direction: 2→
3141

char: 5; direction: 2→
31415

char: 9; direction: 2→
314159

char: 2; direction: 4↓
314159
     2

char: 6; direction: 2→
314159
     26

char: 5; direction: 4↓
314159
     26
      5

char: 3; direction: 6←
314159
     26
     35

char: 5; direction: 6←
314159
     26
    535

char: space; direction: 6←
314159
     26
    535

char: 8; direction: 5↙
314159
     26
    535
  8

char: 9; direction: 2→
314159
     26
    535
  89

etc.

Also note how I take advantage of the palindromized part 535 here so I'm able to draw those digits backwards. With most other digit-substrings I have to first go to the correct position with spaces before drawing the actual digits in direction 2→.
I use this same palindroized approach also for the digit-substrings 323 and 626.
The reason the first 3 of the PI-digits is replaced with a 4 is because we use a length of 2 (since lines are overlapping), which causes a minor issue in this case when we reset to the origin location with 'direction' 8. Since we had to insert the dot anyway this doesn't really matter too much.
The 46 to 64 is because we couldn't move around to the next section with spaces like we did with all the other digits for the final 0, since it's encapsulated inside other digits and we can't reach it.
See this 05AB1E tip of mine for an in-depth explanation of how the Canvas builtin works.

JavaScript (ES8),  156 152  151 bytes
_=>`Qk2 SH
2755Q
1C.4USW
Bq4SGG6
6LxSK4xOC5
13n5Ch2DOE
ZbJoBKP
3Zr990 6AS
11gJYN0
7Q8`.replace(/[0-Z]+\w?/g,s=>''.padEnd((n=parseInt(s,36))%16)+(n>>4))

Try it online!
How?
A group of \$k\$ spaces followed by a number \$N\$ is encoded as \$16N+k\$ in base 36 and upper case.
Example:
"            59" -> 16 * 59 + 12 = 956 -> "QK"

The following rules apply to separate a string from the next one:

If it's followed by a line-feed or a period, we leave it as-is.
If it ends with a letter, we put it in lower case.
Otherwise, we use one of the spaces that should have been encoded in the next group as a separator.

As a result, all strings can be unambiguously matched with /[0-Z]+\w?/.

05AB1E, 111 bytes
•DIÿ₅εïΩǝ>Î*.}Öδµ¼ËüúMeĀ¡ζ¿†)в¡Óa×CÁØÒвÕï#â’“¡TÞm×a¿ǝ¬=ß/L@&„@’…ë¼ïæW5éÓ#c∞ðbΣh¬Á‚q”›?иøç,G$X•12B'§Åu„
‡31DT/:

Try it online!
•...•12B'§Åu„ \n‡31DT/:  # trimmed program
                      :  # replace...
                 31      # literal...
                      :  # with...
                 31      # literal...
                   D /   # divided by...
                    T    # 10...
                      :  # in...
                ‡        # replaced each character of...
        '§Å              # "ab"...
           u             # in uppercase...
                ‡        # with corresponding character of...
            „ \n         # literal (\n is newline)...
                ‡        # in...
•...•                    # 12929493392715033775373083693785395621840635578238991913835355382477224495770768407855388223047936086665789536281935915002520324655471900188866985320315060383798192979161318650352714212687144153060399193782953565620356798...
       B                 # converted to base...
     12                  # literal
                         # implicit output

///, 147 bytes
/a/    //b/     5/a   b9  0  64
aaa  230781
3.14159
a  26 b02884
b35 83279a 1971
   89 433aaa  6939
a   79a44aa 937
a   323a749b10
a84a   b8209
626

Try it online!

141 bytes

Perl + -p, 117 bytes
This program contains unprintables so the TIO link is to a Bash program that loads the program from a reversible hex dump.
}{s//
     u0z
Q0�1
3.HI9
TlV�
o5�U9M�
�e3a
�f	�7
Z3�9m0
�
  tN9
x6/;s/[^\d
.]/15>($x=ord$&)?$"x$x:$x-58/ge

Try it online!
This was generated using the following program which uses RLE for spaces and stores runs of digits as bytes where possible.

Retina 0.8.2, 122 bytes

l59b0b64¶n230781¶3.14159¶f26f502884¶e535a83279e1971¶c89a433n6939¶g79d44i937¶g323d749e510¶d84l58209¶626
{`[a-z]
 $&
T`l`_l

Try it online! Uses letters to run-length encode spaces. (The as could be spaces but I couldn't be bothered to special-case them in the encoder.)

Deadfish~, 842 bytes
{i}cc{i}{i}ii{c}cc{i}{i}iciiiic{d}{d}dddddcc{i}iiiiiic{d}ddddddcc{i}{i}iicddc{{d}iiiiii}ddc{i}{i}ii{c}cccc{i}{i}ddcicdddc{i}dddcic{d}iiic{{d}iiiiii}ic{{i}dddddd}icdddddciiiciiicdddciiiiciiiic{{d}iiiii}iiic{i}{i}iicccccc{i}{i}ddciiiic{d}{d}ddcccccc{i}{i}icdddddciiciiiiiiccddddc{{d}iiiiii}ddc{i}{i}iiccccc{i}{i}icddciic{d}{d}dc{i}{i}iiiicdddddcdciiiiiciic{d}{d}dddddccccc{i}{i}dddc{i}ddcddcddddddc{{d}iiiiii}ic{i}{i}iiccc{i}{i}iiiicic{d}{d}dddddc{i}{i}cdcc{d}{d}i{c}cccc{i}{i}iiciiicddddddciiiiiic{{d}iiiii}iiic{i}{i}iiccccccc{i}{i}iiiciic{d}{d}dddddcccc{i}{i}cc{d}{d}ccccccccc{i}{i}iiiiicddddddciiiic{{d}iiiiii}dddddc{i}{i}iiccccccc{i}{i}dcdcic{d}{d}icccc{i}{i}iiicdddciiiiic{d}{d}dddddccccc{i}{i}icddddcdc{{d}iiiiii}iic{i}{i}iicccc{i}{i}iiiicddddc{d}{d}{c}cc{i}{i}iciiicddddddcddc{i}dc{{d}iiiii}iiic{{i}dddddd}iiiicddddciiiic{{d}iiiiii}ddddc

Try it online!
The longest answer so far, and proud of it.


text:
What is the Subspace Dimension?
Challenge
Given the Cartesian coordinates of two or more distinct points in Euclidean n-space (\$\mathbb{R}^n\$), output the minimum dimension of a flat (affine) subspace that contains those points, that is 1 for a line, 2 for a plane, and so on.
For example, in 3-space (the 3-dimensional world we live in), there are a few possibilities:

The points are not coplanar, e.g. (0,0,0),(0,0,1),(0,1,0),(1,0,0). The full 3 dimensions would be needed to describe the points, so the output would be 3
The points are coplanar but not all collinear, e.g. (0,0,0),(1,0,0),(0,1,0),(1,1,0). The points lie on a 2-dimensional surface (a plane), so the output would be 2.
The points are collinear, and there is more than one, e.g. (0,0,0),(1,0,0). They all lie on a line (1-dimensional), so the output is 1.
One or zero points are given. You do not have to handle these degenerate cases.

As @user202729 pointed out in sandbox, this is equivalent to the rank of the matrix whose column vectors are the given points if one of the points is the zero vector.
I encourage upvoting answers that don't have built-ins do most of the work, but they are valid answers.
Details

The coordinates of each point will always be integers, so errors due to excessive floating-point roundoff are not acceptable
Again, you do not have to handle fewer than 2 points
The dimension n will be at least 2
The set of points can be taken in any format that encodes equivalent information to a list of n-tuples. Your program/function may also take n as input if you desire.
Note that the subspace may not necessarily pass through the origin*
This is code-golf, so shortest bytes wins

*Mathematically, if we require the subspace to pass through the origin, then it would be more specifically called a "linear subspace", not just flat.
Testcases
n points -> output
2 (1,0),(0,0) -> 1
2 (0,1),(0,0) -> 1
2 (6,6),(0,-2),(15,18),(12,14) -> 1
2 (0,0),(250,500),(100001,200002) -> 1
2 (0,0),(250,500),(100001,200003) -> 2
2 (3,0),(1,1),(1,0) -> 2
3 (0,0,0),(0,0,1),(0,1,0),(1,0,0) -> 3
3 (0,0,0),(1,0,0),(0,1,0),(1,1,0) -> 2
3 (0,0,0),(1,0,0) -> 1
4 (1,2,3,4),(2,3,4,5),(4,5,6,7),(4,4,4,4),(3,3,3,3),(2,2,2,2) -> 2
5 (5,5,5,5,5),(5,5,6,5,5),(5,6,5,5,5),(6,5,5,5,5),(5,4,3,2,1) -> 4

Related Challenges:

Is the matrix rank one?
Linear Independence.

Is it possible for the input to be something like (1,3),(1,3) so the output is 0?

…set of at least two distinct points…

Why is this not just a "compute the rank of a matrix" challenge?

@DonThousand I think there could be several approaches, not all of which are aided by guaranteeing a point at the origin: rank of matrix of points shifted so one point is at 0; rank of matrix, subtract one; maybe an approach involving hypervolumes or iteratively expanding a flat surface by one dimension

This needs a worked example or 2.

@Shaggy This task does not consist of implementing a single algorithm, and there's already broad examples. Do you need more?

@fireflame241 Ah these aren't linear subspaces.

I am curious as to why this has been flagged as unclear.  It seems all clear to me.

MATL, 12 bytes
t1Y)-X$&Yvoz

Input is a matrix, where each row defines a point.
Try it online! Or verify all test cases.
Explanation
The code uses the singular value decomposition of a matrix, which is done symbolically to prevent floating-point issues. The rank of a matrix equals the number of non-zero singular values.
t      % Implicit input: matrix of integer values. Duplicate
1Y)    % Get the first row
-      % Subtract, with broadcast. This subtracts this row from each row
X$     % Convert to symbolic matrix. Note that integers, are represented
       % exactly as floating-point values up to ±2^53.
&Yv    % Single-output singular value decomposition. Gives a vector with
       % the singular values
o      % Convert to floating point. Note that 0 is represented exactly
       % as a floating-point value
z      % Number of nonzeros. Implicit output

What are the errors in the all-test-cases link?

The code for testing all cases uses an infinite loop that keeps taking an input and producing an output. When there are no more inputs an error is produced. (This is allowed, and anyway it  only affects the modified code that checks all test cases)

Wolfram Language (Mathematica), 23 bytes
MatrixRank@*Differences

Try it online!
Alternative: (23 bytes, 21 characters)
MatrixRank[#&@@#-#]&

Try it online!
SingularValueDecomposition in Mathematica is already 26 bytes long.

APL (Dyalog Unicode), 17 bytes
≢⍸1≠1+2⊃8415⌶2-⌿⎕

Try it online!
Happens to be a mix of existing MATL and Mathematica solutions. Performs Singular Value Decomposition on pairwise differences of the rows, and counts nonzero eigenvalues in the result of SVD. Since APL does not have symbolic computation, we use "significantly different from zero" test instead.
How it works
≢⍸1≠1+2⊃8415⌶2-⌿⎕
             2-⌿⎕  ⍝ Pairwise row differences of the input
      2⊃8415⌶      ⍝ The second matrix (diagonal matrix of eigenvalues) in SVD
  1≠1+             ⍝ Check if each number is significantly different from zero
≢⍸                 ⍝ Count ones

Julia 0.7, 18 bytes
m->rank(m.-m[:,1])

Try it online!
Analogous approach in R is slightly longer (3 bytes saved by Giuseppe):
R, 27 24 bytes
function(m)qr(m-m[,1])$r

Try it online!

qr()$r is 3 bytes shorter.

Uh, I can't understand why I keep forgetting to try partial names instead of full ones... Thanks!

JavaScript (ES6), 187 bytes
There's probably a much shorter way. This is using the matrix rank method.
m=>m[m=m.map(r=>r.map((v,i)=>v-m[0][i])),n=0].map((_,i)=>(R=m.find((r,k)=>r[i]&&r[j=~k]^(r[j]=1)))&&m.map(r=>++j*r[i]&&R.map((v,k)=>r[k]-=k>i&&v*r[i]),n++,R=R.map((v,k)=>k>i?v/R[i]:v)))|n

Try it online!


text:
Make a Ramanujan magic square
Background
As you maybe know Ramanujan made this magic square by \$4x4\$ Matrix:

This works like all magic squares.
But the special thing in this square is that his birthdate is hidden in the first row, the 22\$^{nd}\$ Dec 1887.
Challenge
Can you make one for your birthdate?
Input
The User will give Input in this format: DD/MM/yyYY.
The input can't be a list of 3 numbers([DD,MM,yyYY]).
Here is the formula to make a square for your birthdate

Output
The output should be a "unnormal" or special square, in your languages equivalent for a list.
Note: These are not really magic squares, because as Abigail mentioned tin some dates there are duplicate numbers, but every row, column and diagonal there will e the same number of sum
Test cases:
In: 20/08/2000
Out:
[20, 8, 20, 0]
[1, 19, 5, 23]
[6, 22, 2, 18]
[21, -1, 21, 7]

In: 10/01/2020
Out:
[10, 1, 20, 20]
[21, 19, -2, 13]
[-1, 12, 22, 18]
[21, 19, 11, 0]

In: 10/05/2020
Out:
[10, 5, 20, 20]
[21, 19, 2, 13]
[3, 12, 22, 18]
[21, 19, 11, 4]

In: 00/00/0000
Out:
[0, 0, 0, 0]
[1, -1, -3, 3]
[-2, 2, 2, -2]
[1, -1, 1, -1]

Rules
This is code-golf, so the shortest code wins

Good challenge! However, challenges on Code Golf tend to not require input validation, as it is separate to the challenge itself and tends to detract from it

STDERR is just an output stream like STDOUT. Did you mean "raise an error"? And, as already pointed out, input validation is one of the things to avoid in challenges.

@Bubbler Thanks. I removed the sentence with input validation.

@fireflame241 Thanks too.

can we take the input as a list of 3 numbers, e.g. [20, 8, 2000]

@streetster edited the question . No

Input validation was one thing, rigid I/O is another.

Also what is a "nicely designed in matrix $4x4$"? If you want a rigid output you'll need a precise specification, but a list of lists seems perfectly appropriate here. (Asking for the output to be formatted, unless part of the core challenge, is another form of rigid I/O, so also best avoided.)

@Jonathan Ok edited the question

At this point, I'm just downvoting challenges without any valid reasons for rigid I/O.

"The output should be a magic square". None of your examples is a magic square. Requirements for magic squares include all numbers to be unique. It's in the first sentence of the article you link to. Perhaps you want the output to be exact permutations and additions of small integers as given, and not just any square summing rows, columns and diagonals to the same number, but then you should say so, and not just say "The output should be a magic square".

@Abigail In further description, There are two types of magic squares. A normal and a "unnormal" or special one. This is not there in the Wikipedia link. Example, The diagonals don't work in the magic square from Gauss. Why is it then called a magic square?

@math I'm a bit confused by your reply. My point is that in a magic square all numbers should be unique, which none of your example do. I didn't claim your diagonals don't sum to the magic constant, because they do (trivially, because each diagonal contains a DD, a MM, a yy, a YY, and the +/- of the small integers cancel out). Also, the document you link to doesn't mention Gauss at all.

@Abigail Sorry I didn't mention gauss but franklin. But now I edited the question to "unnormal" magic square. Is that ok?

@math I would even drop any mentioning of a magic square at all, as the exercise isn't about finding a magic square (not even a magic square with duplicate numbers); it's about permutation the input, and adding/subtracting small numbers. Even if you were to change the +/-3 into +/-7, the challenges wouldn't become easier or harder, yet the result isn't a magic square by whatever loose definition one can imagine.

@Abigail Ok, edited the question once again

JavaScript (Node.js),  88  84 bytes
Saved 4 bytes thanks to @NahuelFouilleul
d=>`-BWe
fV?0
@/gU
Xd.A`.replace(/./g,c=>d.substr((n=Buffer(c)[0])/7-6,2)-3+n%7+' ')

Try it online!
How?
Each value in the matrix is encoded as a character whose ASCII code is:
$$7k+o+42$$
where \$k\$ is the 0-indexed position of the variable in the input string and \$o-3\$ is the offset to add.
Example:
For MM-2, the position is \$3\$:
"DD/MM/yyYY"
    ^
 0123456789

and the offset is\$-2\$, leading to:
$$7\times3+(-2+3)+42=64$$
which is '@'.

Can you please explain your answer with comments?

@math I've added an explanation.

Thank you very much.

small improvement using 36 (because multiple of 9) instead of 32, Try it online!

and 84 bytes using 7*k+o+42 Try it online!

APL (Dyalog Unicode), 66 bytes
{4 4⍴(∊(⊣,-)¨3-⍨1011304⊤⍨8⍴6)+,(⊢⍪⌽∘⊖⍪⌽⍪⊖)2 2⍴10⊥⍉⍎¨4 2⍴'/'⎕R''⊢⍵}

Try it online!
How?
The key insight is that the rows correspond to a single 2×2 matrix that has been mirrored vertically, horizontally, not at all, or both.
{4 4⍴(∊(⊣,-)¨3-⍨1011304⊤⍨8⍴6)+,(⊢⍪⌽∘⊖⍪⌽⍪⊖)2 2⍴10⊥⍉⍎¨4 2⍴'/'⎕R''⊢⍵} ⍝ Anonymous inline function
  ⍵            ⍝ Input, e.g. '22/12/1887'
  '/'⎕R''      ⍝ Replace '/' with '', giving e.g 22121887
  10⊥⍉⍎¨4 2⍴   ⍝ Reshape and execute to give vector (22,12,18,87)
  2 2⍴         ⍝ Reshape to 2×2 matrix (22 12)(18 87)
  (⊢⍪⌽∘⊖⍪⌽⍪⊖)  ⍝ Mirror the matrix in 4 ways to get the 4 rows
  ,            ⍝ Flatten to a row vector
  1011304⊤⍨8⍴6 ⍝ Base 6 encoding of 3 3 4 0 1 5 4 4
  3-⍨          ⍝ Subtract 3 from each: 0 0 1 ¯3 ¯2 2 1 1
  ∊(⊣,-)¨      ⍝ Append the negative to each and flatten: 0 0 0 0 1 ¯1 ¯3 3 ¯2 2 2 ¯2 1 ¯1 1 ¯1
  +            ⍝ Add these constants to each element
  4 4⍴         ⍝ Reshape to give a 4×4 matrix

K (ngn/k), 53 51 bytes
Solution:
{4 4#x,(3-7\5330941200)+(x:.'4 2#x^"/")@4\14962353}

Try it online!
Explanation:
Probably further golfable...
{4 4#x,(3-7\5330941200)+(x:.'4 2#x^"/")@4\14962353} / the solution
{                                                 } / lambda taking implicit x
                                        4\14962353  / decode 14962353 into base 4 => 3 2 1 0 1 0 3 2 2 3 0 1
                                       @            / use that to index into
                        (             )             / do all this together
                                 x^"/"              / x except (^) "/"
                             4 2#                   / reshape as 4x2 grid
                           .'                       / 'value each', convert e.g. "20" to 20
                         x:                         / save back into x
                       +                            / add to
       (              )                             / do this together
          7\5330941200                              / decode 5330941200 into base 7 => 2 4 6 0 5 1 1 5 2 4 2 4
        3-                                          / subtract from 3 => 1 -1 -3 3 -2 2 2 -2 1 -1 1 -1
     x,                                             / prepend x
 4 4#                                               / reshape into 4x4 grid

Extra:

-1 byte with ^"/" (except "/") instead of dropping indices 5 and 2 (_/5 2)
-1 byte with 3-7\5330941200 instead of -3+7\8510346000

05AB1E, 27 26 24 bytes
þ2ôÀā+āδ-˜•ItíË€ß•.I4ô

-2 bytes by porting @JonathanAllan's Jelly answer, so make sure to upvote him as well!
Try it online or verify all test cases.

Old 27 26 bytes approach:
þ2ôÂD2ôR˜Â)•CV¤½‘àý•S4ä3-+

Try it online or verify all test cases.
Explanation:
þ         # Leave the digits of the (implicit) input-string: "dd/MM/YYyy" to "ddMMYYyy"
 2ô       # Split it into parts of size 2: [DD,MM,yy,YY]
À         # Rotate it once towards the left: [MM,yy,YY,DD]
 ā        # Push a list in the range [1,length] (without popping): [1,2,3,4]
  +       # Add the values at the same indices: [MM+1,yy+2,YY+3,DD+4]
ā         # Push [1,2,3,4] again
 δ        # Apply double-vectorized on these lists:
  -       #  Subtract
          # (results in: [[MM,MM-1,MM-2,MM-3],[yy+1,yy,yy-1,yy-2],[YY+2,YY+1,YY,YY-1],
          #  [DD+3,DD+2,DD+1,DD]])
   ˜      # Flatten it:
          #  [MM,MM-1,MM-2,MM-3,yy+1,yy,yy-1,yy-2,YY+2,YY+1,YY,YY-1,DD+3,DD+2,DD+1,DD]
    ā     # Push a list in the range [1,length] (without popping) again: [1,...,16]
•IZΔmλR•  # Push compressed integer 19556972234337
 .I       # Get the 19556972234337'th permutation of the [1,16] list
   è      # Index each into the list of values (modular 0-based, so 16 is the first):
          #  [DD,MM,yy,YY,YY+1,yy-1,MM+3,DD+3,MM-2,DD+2,YY+2,yy-2,yy+1,YY-1,DD+1,MM-1]
    4ô    # And split it into parts of size 4 again
          # (after which the result is output implicitly

þ2ô       # Same as above: [DD,MM,yy,YY]
Â         # Bifurcate this list (short for Duplicate & Reverse copy)
          #  [DD,MM,yy,YY] → [YY,yy,MM,DD]
 D        # Duplicate it
  2ô      # Split it into pairs
          #  [YY,yy,MM,DD] → [[YY,yy],[MM,DD]]
    R     # Reverse the pairs
          #  [[YY,yy],[MM,DD]] → [[MM,DD],[YY,yy]]
     ˜    # Flatten it back again to a quartet
          #  [[MM,DD],[YY,yy]] → [MM,DD,YY,yy]
      Â   # Bifurcate that as well
          #  [MM,DD,YY,yy] → [yy,YY,DD,MM]
       )  # And wrap all list on the stack into a list
          #  → [[DD,MM,yy,YY],[YY,yy,MM,DD],[MM,DD,YY,yy],[yy,YY,DD,MM]]
•CV¤½‘àý• # Push compressed integer 3333420615514242
 S        # Convert it to a list of digits: [3,3,3,3,4,2,0,6,1,5,5,1,4,2,4,2]
  4ä      # Split it into 4 equal-sized parts: [[3,3,3,3],[4,2,0,6],[1,5,5,1],[4,2,4,2]]
    3-    # Subtract 3 from each: [[0,0,0,0],[1,-1,-3,3],[-2,2,2,-2],[1,-1,1,-1]]
      +   # Add the values in the lists together:
          #  [[DD,MM,yy,YY],
          #   [YY+1,yy-1,MM-3,DD+3],
          #   [MM-2,DD+2,YY+2,yy-2],
          #   [yy+1,YY-1,DD+1,MM-1]]
          # (after which the result is output implicitly

See this 05AB1E tip of mine (sections How to compress large integers? and How to compress integer lists?) to understand why •IZΔmλR• is 19556972234337 and •CV¤½‘àý• is 3333420615514242.

No need to pretty print now.

Jelly,  27  26 bytes
ḟṂs2Vṙ1+J$_Ɱ4F“Œñḳ⁶.C’œ?ṁƲ

A monadic Link accepting the list of characters as specified which yields a list of lists of integers.
Try it online!
How?
ḟṂs2Vṙ1+J$_Ɱ4F“Œñḳ⁶.C’œ?ṁƲ - Link: list of characters, D    e.g. "01/09/2000"
 Ṃ                         - minimum                             '/'
ḟ                          - filter discard                      "01092000"
  s2                       - split into twos                     ["01","09","20","00"]
    V                      - evaluate                            [1,9,20,0]
     ṙ1                    - rotate left 1                       [9,20,0,1]
         $                 - last two links as a monad:
        J                  -   range of length                   [1,2,3,4]
       +                   -   add                               [10,22,3,5]
           Ɱ4              - map across [1..4] with:
          _                -   subtract                          [[9,21,2,4],[8,20,1,3],[7,19,0,2],[6,18,-1,1]]
                         Ʋ - last four links as a monad - f(x):
             F             -   flatten                           [9,21,2,4,8,20,1,3,7,19,0,2,6,18,-1,1]
              “Œñḳ⁶.C’     -   base 250 integer = 19644039699318
                      œ?   -   nth permutation                   [1,9,20,0,1,19,6,4,7,3,2,18,21,-1,2,8]
                        ṁ  -   mould like (x)                    [[1,9,20,0],[1,19,6,4],[7,3,2,18],[21,-1,2,8]]

perl -nl -M5.010, 106 bytes
/.(\d\d).(\d\d)/;$,=$";say$`,$1,$2,$';say$'+1,$2-1,$1-3,$`+3;say$1-2,$`+2,$'+2,$2-2;say$2+1,$'-1,$`+1,$1-1

Try it online!
How does it work?
/.(\d\d).(\d\d)/;

This lines parses the input. It matches the /MM/yy part of the input, leaving MM in $1 (the first capture) and yy in $2. DD is available in $`  (the "prematch"), and YY is available in $' ("postmatch").
$, = $";

This sets the output field separator equal to the list separator, the latter is by default a space. This makes that our output numbers are separated by a space.
say $`    , $1    , $2    , $';
say $' + 1, $2 - 1, $1 - 3, $` + 3;
say $1 - 2, $` + 2, $' + 2, $2 - 2;
say $2 + 1, $' - 1, $` + 1, $1 - 1

Print out the 16 required numbers. In the top row, it will keep any leading spaces, as the values are printed "as is".

+1. Nice use of $, too... You can save 3 bytes using m!/(..)/(..)!: Try it online!

71 bytes using character encoding, like Arnauld answer : Try it online!

Charcoal, 46 bytes
Ｅ⪪+5?IJ>2.3-K=@H,4⁴⪫Ｅι◧Ｉ⁺⁻﹪℅λχ³§Ｉ⪪⪫⪪θ/ω²÷℅λχ²

Try it online! Link is to verbose version of code. Explanation:
Ｅ⪪+5?IJ>2.3-K=@H,4⁴

Split the string literal +5?IJ>2.3-K=@H,4 into chunks of 4 characters and loop over each chunk, which represents a row of the magic square.
⪫Ｅι◧Ｉ...²

Loop over each character, and pad each result to 2 characters and join them together to form the row.
⁺⁻﹪℅λχ³§...÷℅λχ

Take the ASCII code of the character and divmod it by 10. Subtract 3 from the remainder to give a value in the range -3..3 and add the date part given by the quotient (this is offset by 4 but that works due to Charcoal's cyclic indexing).
Ｉ⪪⪫⪪θ/ω²

Delete the /s from the input string, split the result into pairs of digits and take their value.

Perl 5 + -pF/\/?(\d\d)/ -Mbigint, 74 bytes
$_="1357
7531
3175
5713";s!.!$F[$&]-3+(3333420615514242=~/./g)[$i++].$"!ge

Try it online!
Verify all test cases online!
Explanation
The -F flag, splits the input into @F as ('',22,'',12,'',18,'',87). In the code $_ is set to a string containing the index of @F that we need the number from, then s/// replaces any char (. - this excludes newline) with the the corresponding value from @F minus 3, plus the digit from 3333420615514242 at the $index, appending $" (space).

i've seen this answer after comment on other perl answer, Try it online! without using -F flag otherwise /\/|(?=..$)/ can be  useful

62 bytes using -F trick Try it online!


text:
Create a Boolean Calculator
Our boolean operators are AND, OR, XOR, NAND, NOR, XNOR and, in conjunction with one of those operators, NOT.
Our numbers are \$1\$ and \$0\$.
The challenge is to write a program or function that calculates the results of the input.
Input
A string, array or other input format of your choice; containing alternating numbers and operators, e.g. 1 NOR 1 or ["1","OR","0","AND","1"] or 0XOR0XNOR1.
As an exception, NOT must always come directly after another operator (e.g. 0 AND NOT 1).. You can't implement NOT by itself, and you won't ever get a chain of multiple NOTs (so 1 AND NOT NOT 0 is an invalid input).
The input must contain the strings for the operators (upper or lower-case is fine); no other representation can be used e.g. .+^¬||&& etc.
Output
Return or print a single number (\$1\$ or \$0\$), derived using the calculation below. Invalid input can lead to any output you choose, or none.
Calculation
We're ignoring any precedence rules here - just calculate them in the order they come in (i.e. left-to-right) - as if someone was typing it into a calculator and pressing Enter after each number. NOT is the only one that might cause some difficulties with that logic, as you need to figure out what it's NOT-ing before you can apply the other operator.
Truth Tables
INPUT   OUTPUT
A   B   AND NAND OR NOR XOR XNOR
0   0    0   1   0   1   0   1
0   1    0   1   1   0   1   0
1   0    0   1   1   0   1   0
1   1    1   0   1   0   0   1

IN OUT
A  NOT A
0    1
1    0

Examples

1 NOR 1 = 0
1 NOR NOT 0 = 0 (equivalent to \$1\$ NOR \$1\$)
1 NOR NOT 0 AND 1 = 0 (equivalent to \$0\$ (from above) AND \$1\$)
1 NOR NOT 0 AND 1 OR 1 = 1 (equivalent to \$0\$ (from above) OR \$1\$)
1 NOR NOT 0 AND 1 OR 1 XNOR 1 = 1 (equivalent to \$1\$ (from above) XNOR \$1\$)
1 NOR NOT 0 AND 1 OR 1 XNOR 1 NAND 0 = 1 (equivalent to \$1\$ (from above) NAND \$1\$)
1 NOR NOT 0 AND 1 OR 1 XNOR 1 NAND 0 XOR NOT 0 = 0 (equivalent to \$1\$ (from above) XNOR NOT \$0\$ = \$1\$ XNOR \$1\$ = \$0\$)

Scoring
This is code-golf, but with a twist.
Your score is the number of bytes in your code, divided by the number of operators your code implements. Smallest score wins.
For example, if you only implement AND, your score is the number of bytes of your code.
If you implement AND, OR, XOR, NAND, NOR, XNOR, NOT (the full list of operators); then you get to divide the number of bytes by 7.
You must implement at least one operator, and you cannot implement NOT by itself; as it must be preceded by another, different operator and so doesn't count as implemented otherwise.
Just because someone has a low score already, don't let that put you off trying to get the best score for your language! It would be interesting to compare across different numbers of implemented operators too - e.g. you might have a bad score for 2 operators, but you might be able to implement 7 really efficiently.

Note I found this (related?) challenge: https://codegolf.stackexchange.com/questions/78351/create-a-boolean-parser-continued; but I think this is sufficiently different

Can we take the operands as lowercase, or is uppercase mandatory?

Is the input guaranteed to have a space between each token (a number or an operator)? Can I take tokenized input (e.g. ["1", "NOR", "NOT", "0"])?

@KevinCruijssen I don't see why not

@Bubbler the input format is flexible as long as it uses the strings for the boolean operators. An array is fine; you can decide if your input has to have spaces or not. Updated question to clarify both comments

Now I think choosing to implement just OR or AND may actually get the best score in many languages, by bypassing the parsing stage and testing the numbers directly...

@Bubbler is that a problem with my spec then? I'm not sure how to resolve that (and certainly not now that we already have some answers) - but for future specs, should I put something like if the input is invalid, the output must be different to if the input was valid - to force programs to care about the input? Or how else could I resolve this?

@simonalexander2005 Requiring at least two operators might have been better, but yeah, it's a bad idea to change the spec after getting some answers. Let's keep it as is, and just pray it doesn't happen in your next challenge. :)

Can we output True/False for 1/0? I think this is generally allowed by default in a language like Python where True==1 and False==0, but am never sure.

@xnor yes, I would say so - it fits with the spirit of the question being boolean logic and all!

Along the same lines as xnor, can we take true/false input instead of 1/0?

@att yes that's fine

Python, 3 bytes ÷ 1 op = score 3
min

Try it online!
Implements AND, with inputs like ["1", "AND", "0", "AND", "0"]. Simply takes the smallest string value, which is "0" if present and "1" otherwise. Since "AND" is later alphabetically, it can be ignored.
Another solution is all, using inputs like [1, "AND", 0, "AND", 0] since only 0 is Falsey. Python 2 could also do min with such inputs, since it has numbers as smaller than strings, whereas Python 3 refuses to compare them.

I'm surprised your solution doesn't work for XNOR, xnor

I didn't understand, for examples I have ['1','OR',0], it should return 1 but it obviously returns 0.

@VictorVosMottorthanksMonica The 0 is a number, instead of a string, like the '1'. Maybe that's why?

@VictorVosMottorthanksMonica This only supports AND -- it actually ignores the operator strings.

Pyth, 1 byte ÷ 2 = 0.5
v

Try it online!
This works for and and not. Works by evaluating the input as python code

Python 3, 16 4 bytes / 2 = 2 score
eval

Try it online!
This works for and and not in any combinations. It partially works for or but only when not used in conjunction with and in certain cases due to operator precedence in Python. As such cases exist, my official score will only be divided by two (if half-points are allowed, this could maybe be divided by 2.5 instead to get a final score of 1.6)

Unfortunately I don't think you can quite get or together with and since Python's operator precedence evaluates and's first, so 1 or 0 and 0 gives 1 rather than 0.

@xnor good point, I overlooked that. I'll try to fix it without adding too many bytes

Your first solution can actually just be eval on its own, since f=eval would work.

It turns out any fix for this 1 or 0 and 0 case would make my score go up a lot more than simply removing or from the working functions. I've made changes accordingly

Sorry to report that the task is trivial in some language, but anyway here it is.
J, 2 bytes, score 2 ÷ 1 = 2
".

Try it online!
Implements any one of AND, OR, or XOR. The three are defined in the J standard library as infix functions, so calling ". (eval) on the string automagically evaluates the given expression as-is. The only problem is that J evaluates from right to left, so the three cannot be used at once.
Since it is boring, here are some attempts at adding features one at a time:
J, 10 bytes, score 10 ÷ 3 = 3.33
[:".|.&.;:

Try it online!
Implements all of AND, OR, and XOR. Since all six operators (except NOT) are symmetric, in order to fix the evaluation order, it suffices to reverse the order of words.
[:".|.&.;:  NB. Input: the expression with space-separated tokens
            NB. Example input '1 AND 1 XOR 0'
      &.;:  NB. Split into words ['1', 'AND', '1', 'XOR', '0']
    |.      NB. Reverse the order of words ['0', 'XOR', '1', 'AND', '1']
      &.;:  NB. Join the words back, with spaces in between '0 XOR 1 AND 1'
[:".        NB. Eval it

At this point, adding a feature is a matter of defining a named infix function.
J, 18 bytes, score 18 ÷ 4 = 4.5
NOR=:+:
[:".|.&.;:

Try it online!
Adds NOR (+:) to the list.
J, 26 bytes, score 26 ÷ 5 = 5.2
XNOR=:=
NOR=:+:
[:".|.&.;:

Try it online!
Adds XNOR (=) to the list.
J, 35 bytes, score 35 ÷ 6 = 5.83
NAND=:*:
XNOR=:=
NOR=:+:
[:".|.&.;:

Try it online!
Adds NAND (*:) to the list.
Using the same strategy to add NOT is a bit more tricky, since the word order would look like 1 NOT AND 1 instead of 1 AND NOT 1, and it should negate the number on its left. I solved it by making it a "conjunction", which has higher precedence over regular functions or "verbs" and consumes two tokens on the both sides of it. It is defined as
NOT=:2 :'y v-.u'

and it evaluates like this: given 0 NOT AND 1, u, v, y become 0, AND, 1 respectively, and y v-.u becomes 1 AND -. 0 (where -. is a prefix function for logical negation), successfully negating the number on its left before applying the infix function.
J, 52 bytes, score 52 ÷ 7 = 7.43
NOT=:2 :'y v-.u'
NAND=:*:
XNOR=:=
NOR=:+:
[:".|.&.;:

Try it online!

05AB1E, score: 1 (1 byte, 1 operator)
ß

Input as a list of strings for each digit/operator.
Implements AND.
Port of @xnor's Python answer.
Try it online or verify a few more test cases.
Explanation:
ß    # Pop the (implicit) input-list and leave its minimum,
     # which is "0" if the input contains a "0", or "1" otherwise
     # (after which this is output implicitly as result)

05AB1E, score: ~7.857 (55 bytes, 7 operators)
1ÝÂ„€– ìs:„€ƒ€—#„nxvDyìì}„&~SD'_«ì'^õšD'_«ìì:#ðš2ôí˜J.V

Input is a single lowercase string.
Implements all 7 operators.
Try it online or verify all test cases.
Explanation:
Step 1: Replace the not 1/not 0 with 0/1 respectively:
I.e. 1 nor not 0 and 1 or 1 xnor 1 nand 0 xor not 0 is converted to 1 nor 1 and 1 or 1 xnor 1 nand 0 xor 1.
1Ý                   # Push list [0,1]
  Â                  # Bifurcate it (short for Duplicate & Reverse copy): [1,0]
   „€–               # Push dictionary string "not "
       ì             # Prepend it in front of both: ["not 1","not 0"]
        s            # Swap so the [0,1] is at the top of the list again
         :           # Replace all ["not 1","not 0"] with [0,1] in the (implicit) input

Step 2: Replace all other operations xnor/xor/nand/nor/and/or with ^_/^/&_/~_/&/~ respectively:
I.e. 1 nor 1 and 1 or 1 xnor 1 nand 0 xor 1 is converted to 1 ~_ 1 & 1 ~ 1 ^_ 1 &_ 0 ^ 1.
„€ƒ€—                # Push dictionary string "and or"
     #               # Split it on spaces: ["and","or"]
      „nx            # Push string "nx"
         v           # Loop `y` of its characters:
          D          #  Duplicate the list at the top of the stack
           yì        #  Prepend the current letter to each string in the list
             ì       #  Prepend-merge the lists together
         }           # Stop the loop. We now have the list:
                     #  ["xnand","xnor","xand","xor","nand","nor","and","or"]
„&~                  # Push string "&~"
   S                 # Convert it to a list of characters: ["&","~"]
    D                # Duplicate it
     '_«            '# Append "_" to each: ["&_","~_"]
        ì            # Prepend-merge it: ["&_","~_","&","~"]
         '^         '# Push "^"
           õš        # Convert it to a list, and prepend an empty string: ["","^"]
             D       # Duplicate it
              '_«   '# Append "_" to each: ["_","^_"]
                 ì   # Prepend-merge it: ["_","^_","","^"]
                  ì  # Prepend-merge it: ["_","^_","","^","&_","~_","&","~"]
:                    # Replace all ["xnand","xnor","xand","xor","nand","nor","and","or"]
                     # with ["_","^_","","^","&_","~_","&","~"]

&~^ are builtins for bitwise AND, OR, and XOR respectively. And _ is the ==0 builtin (which converts 0 to 1 and vice-versa).
Step 3: Convert it to Reverse Polish notation:
I.e. 1 ~_ 1 & 1 ~ 1 ^_ 1 &_ 0 ^ 1 is converted to 1 1~_1&1~1^_0&_1^.
 #                   # Split the string by spaces
  ðš                 # Prepend a leading " " to the list
    2ô               # Split the list into parts of size 2
      í              # Reverse each pair
       ˜J            # Flattened join everything together

Step 4: Execute/evaluate it as 05AB1E code, and output the result:
I.e. 1 1~_1&1~1^_0&_1^ results in 0.
         .V          # Evaluate/execute it as 05AB1E code
                     # (after which the result is output implicitly)

See this 05AB1E tip of mine (section How to use the dictionary?) to understand why „€–  is "not " and „€ƒ€— is "and or".

Python 2, score 15.714 (132 ... 114 110 bytes, 7 operators)
Input is a single string with lowercase operators.
b=c=d=49
for a in input().replace('t ','a').split():a=hash(a);c,d=[a|d,a&d,a^d^1][b%65%3]^b%45,c;b=a
print~c&1

Try it online!
The code uses the following numbers produced by Python 2's hash function:
+--------+----------------------+-----+--------+--------+
| string |    h=hash(string)    | h&1 | h%65%3 | h%45&1 |
+--------+----------------------+-----+--------+--------+
| and    |  1453079729200098176 |     |      0 |      0 |
| nand   | -4166578487142698835 |     |      0 |      1 |
| or     |    14208085359128317 |     |      1 |      0 |
| nor    |  5261102140395498078 |     |      1 |      1 |
| xor    | -5999452984713080668 |     |      2 |      0 |
| xnor   |   485507670233933377 |     |      2 |      1 |
|        |                      |     |        |        |
| 0      |           6144018481 |   1 |        |        |
| 1      |           6272018864 |   0 |        |        |
| noa0   | -4166584487129698722 |   0 |        |        |
| noa1   | -4166584487129698721 |   1 |        |        |
+--------+----------------------+-----+--------+--------+

I think you can have your second solution take input as a list like [1,"OR",0,"OR",1] and so be lambda l:1in s.

@xnor I removed that part of my answer, as your solution does a way better job at showing that answers with a single operator perform better.

APL (Dyalog Unicode), 43 36 bytes ÷ 6 = 6
Thank you user41805 for the idea of combining definitions that are negations of each other and to tsh for noticing stray spaces.
DNAN←~DNA←∧
RON←~RO←∨
ROX←~RONX←=
⍎⌽

Try it online!
Since APL is right-to-left, we define the functions with reversed names, then reverse the expression (⌽) and execute it (⍎).

APL (Dyalog Unicode), 57 50 bytes ÷ 7 = 7.14
Thank you user41805 for the idea of combining definitions that are negations of each other and to tsh for noticing stray spaces.
DNAN←~DNA←∧
RON←~RO←∨
ROX←~RONX←=
TON←{⍵ ⍵⍵~⍺⍺}
⍎⌽

Try it online!
Since APL is right-to-left, we define the functions with reversed names, then reverse the expression (⌽) and execute it (⍎). NOT (TON) requires special treatment. We define it as a dyadic operator ({…}) because this makes it bind stronger to its operands. We then negate the left (original right) operand (~⍺⍺) and apply the right operand (⍵⍵ — originally on its left) with the right argument (⍵ originally from its left) as left argument. The arguments' sides doesn't matter since all functions are commutative.

It seems combining ≠ and = like RONX←~ROX←≠ works

@user41805 Ah yes, I miscalculated that that would be the same byte count.

@Bubbler Thanks. Fixed.

So hilarious to see the 7-operator version exactly ties with that of J, and it even uses the exact same dop/conjunction for NOT.

@Bubbler Ah, well, but J is "cheating" by using predefined words; APL is obviously getting a lot more done for the same character count. NOT has to be to be the same for syntactic reasons.

I'm not sure what's going wrong. It seems that there are extra spaces at the end of lines in your program. Simply removing them may save 2 bytes.

@tsh Thanks. Fixed. Also made me notice the TIO link mess-up.

Japt, 1 byte ÷ 1 = 1
e

Try it online!
Implements only and. Works by checking if every element in the input has a truthy value.

FEU, 33 bytes, 2 operations, score 16.5
m/NOT 0/1/NOT 1/0/.*1.*/1/[^1]+/0

Try it online!
Implements NOT and OR

Sorry, I didn't mean to say Turing Complete, it just computes "NOT" and "OR" and I get similar terms mixed up a lot.

Retina 0.8.2, 84 bytes, score 12
NOT0
1
NOT1
0
^(0A|1NO|(0NA|1O))[A-Z]+.
$#2
}`^(1A|0O|0XO|1XN)[A-Z]+

}`^.[A-Z]+
NOT

Try it online! Link includes test suite that deletes spaces from the input for the convenience of the user. Explanation:
NOT0
1
NOT1
0

Handle the NOT operator.
^(0A|1NO|(0NA|1O))[A-Z]+.
$#2

0 AND and 1 NOR are always 0, while 0 NAND and 1 OR are always 1, regardless of the RHS.
}`^(1A|0O|0XO|1XN)[A-Z]+

1 AND, 0 OR, 0 XOR and 1 XNOR leave the RHS unchanged. Repeat the above operations until an operation that inverts the RHS is reached.
}`^.[A-Z]+
NOT

Replace this operation with a NOT and loop around to start processing operations again.

APL (Dyalog Extended), 2 bytes ÷ 1 = 2
~⍲

Try it online!
⍲ (nand) returns 1 if and only if argument has a 0 anywhere (it ignores all other data)
~ negates that

APL (dzaima/APL), 2 bytes ÷ 1 = 2
1∊

Try it online!
Simply asks is there any 1 in the argument?

Perl 5, 86 bytes / 7 operators = 12.29
s/not/!/g;s/\d//;$\=1*$1;$\=eval"$\ $_"=~s/(.*?[^a])n(.*)/!($1$2)/r for/.*?\d/g}{$\|=0

Try it online!
Perl 5, 9 bytes / 3 operators (or, xor, not) = 3
$_=0|eval

Try it online!

Fails on 1 or 0 and 0: https://tio.run/##K0gtyjH9/18l3tagJrUsMef/f0OF/CIFA4XEvBQFg3/5BSWZ@XnF/3ULAA

It's performing proper order of operations.  So the and part gets evaluated first.

yes, but the challenge specifies that it should be calculated left-to-right.

66 bytes,for 7 operators,otherwise 2nd only works for 2 operators (not , and) because of perl operator precedence

56 bytes also seems to work

The "eval" code is correct when you exclude "and" (because "or" and "xor" are the same precedence), so score is 9/3 = 3. I give you +1 because that would have been my answer.

JavaScript (ES7), 77 bytes / 7 operators = 11
Expects a string with no separator, such as "1NORNOT0".
f=s=>1/s?s:f(s.replace(/..*?\d/,s=>10142470953/2**(parseInt(s,36)%873%34)&1))

Try it online!
Or try all possible sub-expressions.
How?
We use a recursive function to simplify the input string s until we get a single digit. When this happens, 1/s is either 1 or Infinity, which are both truthy.
As long as s still contains at least one operator, we use the following regular expression to isolate the next sub-expression:
/..*?\d/
 .         a single character (must be 0 or 1)
  .*?      followed by several characters, non-greedily
     \d    followed by a digit

We use this hash function (which was brute-forced) to get the result of the sub-expression and replace it in s:
10142470953 / 2 ** (parseInt(s, 36) % 873 % 34) & 1

It's unfortunate that you couldn't get the hash down to 32 or fewer bits, otherwise you could have used >>>.

SimpleTemplate, 361 bytes ÷ 4 operators = 90.25
It is a very big piece of code, but was very challenging!
{@fnP S}{@fnT.AND a,b}{@ifa}{@ifa is equalb}{@return1}{@/}{@/}{@return"0"}{@/}{@fnT.OR a,b}{@incbyb a}{@ifa}{@return1}{@/}{@return"0"}{@/}{@fnT.XOR a,b}{@ifa is equalb}{@return1}{@/}{@return"0"}{@/}{@whileS matches"@([01])(AND|X?OR)(NOT)?([01])@"P}{@callT.[P.2]intoR P.1,P.4}{@ifP.3}{@setT 1,0}{@setR T.[R]}{@/}{@callstr_replace intoS P.0,R,S}{@/}{@returnS}{@/}

This implements the AND, OR, XOR and NOT operators.
This was entirely implemented without using AND, OR and XOR, as those don't exist in my language, at all!
It was even more challenging due to a bug in the compiler, where {@return 0} returns null ... :/ 6 bytes right there ...

You can try it on: http://sandbox.onlinephpfunctions.com/code/cb1855c48e83924bd7c81f4cda95f032c23b4abe

Usage:
Simply call the function P and pass a single string without spaces.
Returns either 0 or 1, or the whole string for invalid inputs.
Example:
{@call P into result "1ORNOT0"}
{@echo result}

Ungolfed:
Since this is a massive mess, I've also prepared an human readable version:
{@fn parse string}
    {@fn this.AND a, b}
        {@if a}
            {@if a is equal to b}
                {@return 1}
            {@/}
        {@/}
        {@return "0"}
    {@/}

    {@fn this.OR a, b}
        {@inc by b a}
        {@if a}
            {@return 1}
        {@/}
        {@return "0"}
    {@/}

    {@fn this.XOR a, b}
        {@if a is equal to b}
            {@return 1}
        {@/}
        {@return "0"}
    {@/}

    {@while string matches "@([01])(AND|X?OR)(NOT)?([01])@" pieces}
        {@call this.[pieces.2] into result pieces.1, pieces.4}
        {@if pieces.3}
            {@set tmp 1, 0}
            {@set result tmp.[result]}
        {@/}
        {@call str_replace into string pieces.0, result, string}
    {@/}

    {@return string}
{@/}

This works exactly the same way, except the function is called "parse".

Alternative:
Below is a SUPER boring one that has EVERYTHING pre-calculated, but has a score of 276/7 = 39.428571428571... (428571 is recurring).
{@fnP S}{@setL.AND"001"}{@setL.NAND"110"}{@setL.OR"011"}{@setL.NOR"100"}{@setL.XOR"010"}{@setL.XNOR"101"}{@whileS matches"@([01])(N?AND|X?N?OR)(NOT)?([01])@"P}{@ifP.3}{@setT"10"}{@setP.4 T.[P.4]}{@/}{@incbyP.4 P.1}{@callstr_replace intoS P.0,L.[P.2].[P.1],S}{@/}{@returnS}{@/}

It implements all operators, but ... It is kinda cheating...
Below it the ungolfed version:
{@fn parse string}
    {@set table.AND 0, 0, 1}
    {@set table.NAND 1, 1, 0}
    {@set table.OR 0, 1, 1}
    {@set table.NOR 1, 0, 0}
    {@set table.XOR 0, 1, 0}
    {@set table.XNOR 1, 0, 1}

    {@while string matches "@([01])(N?AND|X?N?OR)(NOT)?([01])@" pieces}
        {@if pieces.3}
            {@set tmp 1, 0}
            {@set pieces.4 tmp.[pieces.4]}
        {@/}
        {@inc by pieces.4 pieces.1}
        {@set values table.[pieces.2]}
        {@call str_replace into string pieces.0, values.[pieces.1], string}
    {@/}

    {@return string}
{@/}

sed, 8 bytes ÷ 1 = 8
/0/c0
c1

Try it online!
Implements only and.
Explanation
/0/c0   # Set contents of line to 0 if line contains 0
c1      # Otherwise set contents to 1

Haskell, \$225 \div 4 = 56.25\$
b(_:'A':'0':s)=b('0':s)
b(c:'A':_:s)=b(c:s)
b(_:'O':'1':s)=b('1':s)
b(c:'O':_:s)=b(c:s)
b('N':'0':s)=b('1':s)
b('N':_:s)=b('0':s)
b('0':'X':'0':s)=b('0':s)
b('1':'X':'1':s)=b('0':s)
b(_:'X':_:s)=b('1':s)
b x=x
f=(b.map(!!0))

Defines a function f, which given a list of the format ["1","AND","0"] returns either "1" or "0". Implements AND, OR, NOT, and XOR.

brainfuck, 130 bytes / 1 operator = 130
+>>+<,[------------------------------------------------[<->[-]]<[>>[-]<<-]><+>,]>++++++++++++++++++++++++++++++++++++++++++++++++.

Try it online!
Link is for a readable, commented version. Only implements AND. Although technically all it does is print 1 unless there is a 0 in your input, in which case it prints 0. It might be possible to shorten this by replacing the spots where I add/subtract 48 times, but I'm lazy, so I'm going to leave it as is.

Wolfram Language (Mathematica), 62 bytes ÷ 6 = 10.33
Boole@ToExpression[Capitalize@#~StringRiffle~"~"]/.a:0|1:>a>0&

Try it online! Pure function. Takes a list of lowercase strings as input and returns 0 or 1 as output. Supports every operation except NOT.

Wolfram Language (Mathematica), 87 bytes ÷ 7 = 12.43
Boole@ToExpression@StringReplace[Capitalize@#~StringRiffle~"~","t~"->"t@"]/.a:0|1:>a>0&

Try it online! Similar to the previous solution, but it also supports NOT.

Wolfram Language (Mathematica), 15 bytes ÷ 1 = 15
Boole@*FreeQ[0]

Try it online! Function. Takes a list of strings and integers as input and returns 0 or 1 as output. Only supports AND.

JavaScript (V8), 141 bytes ÷ 7 operators, score 20.14
f=i=>'01'[i]||f(i.replace(/NOT./,n=>'10'[n[3]]).replace(/(.)(..)\D*(.)/,(_,a,o,b)=>({AN:a&b,OR:a|b,XO:a^b,NA:a&b^1,NO:(a|b)^1,XN:a^b^1})[o]))

Try it online!
Takes input as a string with capitalised operators and no padding, like 0AND1OR0.
Recursively calculates the next value based on the first two characters of the operator. (not before replacing NOTs with their counterparts)

Japt v2.0a0, 36 bytes ÷ 7 ≈ 5.14
e/..*?\d/@1&#e4#÷0953÷2pXn36 %873%34

Try it
Try all testcases
Try all possible sub-expressions
A direct port of @Arnauld's answer to Japt
Explanation
e/..*?\d/@1&#e4#÷0953÷2pXn36 %873%34
e                                     // Repeatedly replace
 /..*?\d/                             // the regex /..*?\d/g with output of
         @                            // a function which takes the match as arg named X
          1&#e4#÷0953÷2pXn36 %873%34  // and returns 1 & 10142470953 / 2 ** (parseInt(X, 36) % 873 % 34)

The expression 1 & 10142470953 / 2 ** (parseInt(X, 36) % 873 % 34) was brute-forced by @Arnauld

Scala,  183 bytes 164 bytes / 7 ops = ~23.43
"OR".+(_).split("(?<=\\d)")./:(0>1){(b,o)=>val s=o.replace("NOT","")
val c=s!=o^(o.last>48)
s.count(_==78)==1^(if(s toSet 65)!(b&c)else if(s toSet 88)b^c
else b|c)}

Try it online!
The operators are uppercase (whitespace doesn't matter), and the output is a Boolean.