<h3 class='likesectionHead' id='the-weekly-challenge-prolog-solutions'><a id='x1-1000'></a>The Weekly Challenge 322 (Prolog Solutions)</h3>

The examples used here are from the weekly challenge problem statement and demonstrate the working solution. Part 1:String Format You are given a string and a positive integer. Write a script to format the string, removing any dashes, in groups of size given by the integer. The first group can be smaller than the integer but should have at least one character. Groups should be separated by dashes.…