A DUNFERMLINE whiz kid from St Leonard's Primary School has finished runner-up in a UK-wide maths contest.

Rhys Mair, aged 11, of Primary 7, competed against 6,000 students on education website SUMDOG and ended with a score of 985 out of 1,000.

Chris Wilmshurst, Primary 6 and 7 teacher, said: "It's an incredible achievement. Rhys was in first place for most of the week but he was just pipped to the post in the last couple of days.

"His classmates were incredibly proud and there was gasps in the assembly hall when the school found out someone from our school had come second in the whole of the UK."

Sumdog is an interactive online maths website that runs leagues for classes and individuals to improve children's maths fluency.

Children all over the country were given the task of answering 1,000 questions over the course of a week.

Mr Wilmshurst said: "Sumdog gets pupils incredibly motivated for maths at home and school.

"We'll soon be competing in a Fife-wide competition in a couple of months and we're really excited to see how we place after this great award."