D









Deal

Shuffle and deal four hands of five cards each with Python

#!/usr/bin/python3
import random
deck = [
'🂡','🂢','🂣','🂤','🂥','🂦','🂧','🂨','🂩','🂪','🂫','🂭','🂮',
'🂱','🂲','🂳','🂴','🂵','🂶','🂷','🂸','🂹','🂺','🂻','🂽','🂾',
'🃁','🃂','🃃','🃄','🃅','🃆','🃇','🃈','🃉','🃊','🃋','🃍','🃎',
'🃑','🃒','🃓','🃔','🃕','🃖','🃗','🃘','🃙','🃚','🃛','🃝','🃞'
]
random.shuffle(deck)
for i in range(0, 20, 5):
    print(" ".join(deck[i:i+5]))






Plot a trig function and its derivative with Python

#!/usr/bin/env python3
import numpy as n,matplotlib.pyplot as p
x=n.linspace(-4,4,400)
f=n.arctan(x**2);df=2*x/(x**4+1)
p.plot(x,f,'b',label='f(x)=arctan(x²)')
p.plot(x,df,'r',label="f'(x)=2x/(x⁴+1)")
p.axhline(0,c='k',lw=.5);p.axvline(0,c='k',lw=.5)
p.ylim(-2,2);p.xlabel('x');p.ylabel('y')
p.title("f(x) and f'(x)")
p.grid(ls=':',alpha=.7);p.legend();p.show()