Almost done homework about triangles. Only the REPL part remains.