Sally Berry, Head of Computer Science at Dunottar, led the workshops, in which the eager youngsters constructed robots and programed them, using iPads.
The 9- to 10-year-olds then eagerly tackled the task of making their robots move a set distance into a target area.
The determined pupils whole-heartedly embraced the challenge of manoeuvring their robots to avoid obstacles in their paths.
Sally Berry said: "The Year 5s were very enthusiastic, and there was great excitement at seeing which groups would manage to complete each challenge.
"It was delightful to see them working so well in teams to use such creative approaches to solve the challenges.”