Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

6 deleted 5 characters in body

# Python 3, 308 298 292 279 258258254

from itertools import*
def a(t,u,v):
w=(t+u+v)/2;return(w*(w-t)*(w-u)*(w-v))**0**.5
z,x,c,v,b,n=((lambda i,j:(sum((i[x]-j[x])**2for x in[0,1,2]))**0**.5)(x,x)for*x,in combinations([eval(input())for i in">"*4],2))
print(a(z,x,v)+a(z,c,b)+a(b,v,n)+a(x,c,n))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle

# Python 3, 308 298 292 279258

from itertools import*
def a(t,u,v):
w=(t+u+v)/2;return(w*(w-t)*(w-u)*(w-v))**0.5
z,x,c,v,b,n=((lambda i,j:(sum((i[x]-j[x])**2for x in[0,1,2]))**0.5)(x,x)for*x,in combinations([eval(input())for i in">"*4],2))
print(a(z,x,v)+a(z,c,b)+a(b,v,n)+a(x,c,n))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle

# Python 3, 308 298 292 279 258254

from itertools import*
def a(t,u,v):w=(t+u+v)/2;return(w*(w-t)*(w-u)*(w-v))**.5
z,x,c,v,b,n=((lambda i,j:(sum((i[x]-j[x])**2for x in[0,1,2]))**.5)(x,x)for*x,in combinations([eval(input())for i in">"*4],2))
print(a(z,x,v)+a(z,c,b)+a(b,v,n)+a(x,c,n))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle
5 deleted 17 characters in body

# Python 3, 308 298 292 279279258

import math asfrom m,itertools as iimport*
def a(t,u,v):
w=(t+u+v)/2;return m.sqrt(w*(w-t)*(w-u)*(w-v))**0.5
z,x,c,v,b,n=((lambda i,j:m.sqrt(sum((i[x]-j[x])**2for x in[0,1,2]))**0.5)(x,x)for*x,in i.combinations([eval(input())for i in">"*4],2))
print(sum([aa(z,x,v),a+a(z,c,b),a+a(b,v,n),a+a(x,c,n)]))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle

# Python 3, 308 298 292279

import math as m,itertools as i
def a(t,u,v):
w=(t+u+v)/2;return m.sqrt(w*(w-t)*(w-u)*(w-v))
z,x,c,v,b,n=((lambda i,j:m.sqrt(sum((i[x]-j[x])**2for x in[0,1,2])))(x,x)for*x,in i.combinations([eval(input())for i in">"*4],2))
print(sum([a(z,x,v),a(z,c,b),a(b,v,n),a(x,c,n)]))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle

# Python 3, 308 298 292 279258

from itertools import*
def a(t,u,v):
w=(t+u+v)/2;return(w*(w-t)*(w-u)*(w-v))**0.5
z,x,c,v,b,n=((lambda i,j:(sum((i[x]-j[x])**2for x in[0,1,2]))**0.5)(x,x)for*x,in combinations([eval(input())for i in">"*4],2))
print(a(z,x,v)+a(z,c,b)+a(b,v,n)+a(x,c,n))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle
4 deleted 19 characters in body

# Python 3, 308 298 292292279

import math as m,itertools as i
f=[eval(input())for i in">"*4]
l=lambda i,j:m.sqrt(sum((i[x]-j[x])**2for x in range(len(i))))
def a(t,u,v):
w=(t+u+v)/2;return m.sqrt(w*(w-t)*(w-u)*(w-v))
z,x,c,v,b,n=(l(lambda i,j:m.sqrt(sum((i[x]-j[x])**2for x in[0,1,2])))(x,x)for*x,in i.combinations(f[eval(input())for i in">"*4],2))
print(sum([a(z,x,v),a(z,c,b),a(b,v,n),a(x,c,n)]))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle

# Python 3, 308 298292

import math as m,itertools as i
f=[eval(input())for i in">"*4]
l=lambda i,j:m.sqrt(sum((i[x]-j[x])**2for x in range(len(i))))
def a(t,u,v):
w=(t+u+v)/2;return m.sqrt(w*(w-t)*(w-u)*(w-v))
z,x,c,v,b,n=(l(x,x)for*x,in i.combinations(f,2))
print(sum([a(z,x,v),a(z,c,b),a(b,v,n),a(x,c,n)]))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle

# Python 3, 308 298 292279

import math as m,itertools as i
def a(t,u,v):
w=(t+u+v)/2;return m.sqrt(w*(w-t)*(w-u)*(w-v))
z,x,c,v,b,n=((lambda i,j:m.sqrt(sum((i[x]-j[x])**2for x in[0,1,2])))(x,x)for*x,in i.combinations([eval(input())for i in">"*4],2))
print(sum([a(z,x,v),a(z,c,b),a(b,v,n),a(x,c,n)]))


This uses:

• The Pythagorean Theorem (in 3D) to work out the length of each line
• Heron's Formula to work out the area of each triangle
3 deleted 2 characters in body
2 added 1 character in body
1