On November 4, 1952, CBS News used the UNIVAC computer to predict the U.S. presidential election. Early data pointed to an easy win for Dwight D. Eisenhower, but skeptical anchors delayed announcing it. When the results came in, UNIVAC was right, marking the first time a computer accurately forecast a national election.


Predict on what input?
Just copy the source code here.
Sure, here