After reports of strange sightings deep in the forest, a team of adventurous students sets out to investigate. Recently, scientists received credible reports of Sasquatch sightings, but tracking the creature has proven difficult. While footprints occasionally appear on forest paths, they’re often scattered or washed away by rain and wind. Experts believe that if a continuous trail of at least five footprints in a row is found, it would provide solid evidence that Sasquatch has been in the area recently and possibly reveal the creature's direction of travel.
Your team’s mission is to locate these five consecutive footprints without interruption. Only this kind of unbroken trail will allow scientists to make credible measurements, estimate stride length, and perhaps identify key behavioral clues. As you comb through the dense underbrush and listen for the slightest sound, you realize: finding this trail might be the key to proving Sasquatch’s existence once and for all.
Image created by Microsoft Copilot, likely by the Dall-E3 GPT
Write a program that repeatedly prompts the user to enter a command when they see a footprint. The user should type “found” each time they find a print. If the user types anything other than "found", give a message like “No print spotted.” If they find five prints in a row, display “All prints found!” and end the loop.
Enter command to spot footprint: not here
No print spotted.
Enter command to spot footprint: found
Enter command to spot footprint: found
Enter command to spot footprint: found
Enter command to spot footprint: found
Enter command to spot footprint: found
All prints found!