Howard and Alan have both shown alternative methods for building the format. The example in the code as well as…