Cumbrian pupils were introduced to coding concepts and mathematical patterns during a masterclass day.