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

The examples used here are from the weekly challenge problem statement and demonstrate the working solution. Part 1: Replace all ? You are given a string containing only lower case English letters and ?. Write a script to replace all ? in the given string so that the string doesn’t contain consecutive repeating characters. Our solution is short and will be contained in a single file that has the…