Calculate Pi to the nth digit

A python program using Machin’s formula to calculate Pi to the nth
digit.