Skip to main content
added 17 characters in body
Source Link
jferard
  • 1.8k
  • 7
  • 7

Python 3, 214 214 236 240 bytes

lambda n:[[[choice([s,[[c.lower(),'!'][c<'A']for c in s]][((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n-1)*(j<n-1)])," "][i==j==n//2]for j in range(n)]for i in range(n)]
from random import*
s=(("OIAE"*2+"SDLUNTRE")*2+"HVBMCYPWF?GNTR")*2+"ZXJQKGIA"

Try it online!Try it online!

The multiplicity of each character is expressed as sum of powers of two, e.g 12 = 8 + 4 => "E"*12 = "E"*2*2*2 + "E"*2*2.

((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n-1)*(j<n-1) may probably be golfed.

Python 3, 214 236 bytes

lambda n:[[[choice([s,[[c.lower(),'!'][c<'A']for c in s]][((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n)*(j<n)])," "][i==j==n//2]for j in range(n)]for i in range(n)]
from random import*
s=(("OIAE"*2+"SDLUNTRE")*2+"HVBMCYPWF?GNTR")*2+"ZXJQKGIA"

Try it online!

The multiplicity of each character is expressed as sum of powers of two, e.g 12 = 8 + 4 => "E"*12 = "E"*2*2*2 + "E"*2*2.

((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n)*(j<n) may probably be golfed.

Python 3, 214 236 240 bytes

lambda n:[[[choice([s,[[c.lower(),'!'][c<'A']for c in s]][((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n-1)*(j<n-1)])," "][i==j==n//2]for j in range(n)]for i in range(n)]
from random import*
s=(("OIAE"*2+"SDLUNTRE")*2+"HVBMCYPWF?GNTR")*2+"ZXJQKGIA"

Try it online!

The multiplicity of each character is expressed as sum of powers of two, e.g 12 = 8 + 4 => "E"*12 = "E"*2*2*2 + "E"*2*2.

((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n-1)*(j<n-1) may probably be golfed.

added 148 characters in body
Source Link
jferard
  • 1.8k
  • 7
  • 7

Python 3, 214 236 bytes

lambda n:[[[choice([s,[[c.lower(),'!'][c<'A']for c in s]][((i-n//2)%3+(j-n//2)%3<1]%3<1)*(i*j>0)*(i<n)*(j<n)])," "][i==j==n//2]for j in range(n)]for i in range(n)]
from random import*
s=(("OIAE"*2+"SDLUNTRE")*2+"HVBMCYPWF?GNTR")*2+"ZXJQKGIA"

Try it online!Try it online!

The multiplicity of each character is expressed as sum of powers of two, e.g 12 = 8 + 4 => "E"*12 = "E"*2*2*2 + "E"*2*2.

((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n)*(j<n) may probably be golfed.

Python 3, 214 bytes

lambda n:[[[choice([s,[[c.lower(),'!'][c<'A']for c in s]][(i-n//2)%3+(j-n//2)%3<1])," "][i==j==n//2]for j in range(n)]for i in range(n)]
from random import*
s=(("OIAE"*2+"SDLUNTRE")*2+"HVBMCYPWF?GNTR")*2+"ZXJQKGIA"

Try it online!

The multiplicity of each character is expressed as sum of powers of two, e.g 12 = 8 + 4 => "E"*12 = "E"*2*2*2 + "E"*2*2.

Python 3, 214 236 bytes

lambda n:[[[choice([s,[[c.lower(),'!'][c<'A']for c in s]][((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n)*(j<n)])," "][i==j==n//2]for j in range(n)]for i in range(n)]
from random import*
s=(("OIAE"*2+"SDLUNTRE")*2+"HVBMCYPWF?GNTR")*2+"ZXJQKGIA"

Try it online!

The multiplicity of each character is expressed as sum of powers of two, e.g 12 = 8 + 4 => "E"*12 = "E"*2*2*2 + "E"*2*2.

((i-n//2)%3+(j-n//2)%3<1)*(i*j>0)*(i<n)*(j<n) may probably be golfed.

Source Link
jferard
  • 1.8k
  • 7
  • 7

Python 3, 214 bytes

lambda n:[[[choice([s,[[c.lower(),'!'][c<'A']for c in s]][(i-n//2)%3+(j-n//2)%3<1])," "][i==j==n//2]for j in range(n)]for i in range(n)]
from random import*
s=(("OIAE"*2+"SDLUNTRE")*2+"HVBMCYPWF?GNTR")*2+"ZXJQKGIA"

Try it online!

The multiplicity of each character is expressed as sum of powers of two, e.g 12 = 8 + 4 => "E"*12 = "E"*2*2*2 + "E"*2*2.