This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random as r | |
w=r.choice(input("enter csv of words: ").split(",")) | |
d,t,a=["_"for n in w],5,[] | |
while t>0: | |
exit(w)if''.join(d)==w else print(''.join(d)) | |
c=input(f"{t}t:") | |
for p in[p for p,v in enumerate(w)if c==v]:d[p]=w[p] | |
t-=0 if c in w else 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print([[i,"Fizz","Buzz","FizzBuzz"][(i%3==0)+2*(i%5==0)]for i in range(1,100)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as n | |
g,p,w=n.array([[0]*3]*3),1,"-OX" | |
while True: | |
for r in g: print(' '.join(w[x]for x in r)) | |
c,p=int(input(w[-p])),-p | |
g[divmod(c-1,3)]=p | |
s=n.concatenate((n.sum(g,axis=0),n.sum(g.T,axis=0),[sum(g.diagonal())],[sum(n.fliplr(g).diagonal())])) | |
if e:=w[1]if 3 in s else w[2]if-3 in s else 0: exit(e+"wins") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import numpy as np | |
res = 2000 | |
x = np.linspace(-2, 0.5, res) | |
y = np.linspace(-1.1, 1.1, res) | |
c = np.empty((res, res), dtype=complex) | |
for i in range(c.shape[0]): | |
c[i] = x + y[i]*1j | |
m = c.copy() | |
for k in range(200): |