“Good-Afternoon-Your-Royal-Highness,” rang the sing-song chant of 200 eight-to-11-year-olds, as the Duke of York walked into the assembly hall at the City Academy Whitehawk yesterday.

It had taken a few practice runs to make sure the greeting was word-perfect and full-volume, but it was clearly worth it for the smile on Prince Andrew’s face at the culmination of his tour of the primary school.

For well over an hour, His Royal Highness was taken on a guided tour to meet pupils, teachers and parents at the much-improved primary school with which his office has been working for over two years.

He told pupils and teachers: “The reason I’m here is because I’m interested in young people’s education and the investment we’re making in our schools, because you are the future of this country.

“We are going to rely on you to keep this country just as prosperous as it is today.”

He said that he wanted to congratulate the school on the “magnificent strides” it had made in recent years, and encouraged pupils to thank teachers for their “amazing teaching philosophy.”

He added: “It is an enormous pleasure to see what a fantastic job is being done here by children, teachers and parents,” and finished his motivational speech with a movie quote, promising: “I’ll be back.”

Prince Andrew, who arrived by helicopter in a fortunate break in bad weather, was contacted by City Academy Whitehawk’s headmaster David Williams two years ago, when the teacher heard on the radio that the Prince would be devoting additional time to charitable causes.

Mr Williams contacted Buckingham Palace to ask the Prince to consider investing time in the school, which has gone from 'special measures' to an Ofsted rating of 'good' in recent years.

The Prince agreed to take an interest and the collaboration has led to school pupils enjoying behind-the-scenes trips to Buckingham Palace, with introductions to charitable partners which have contributed to the school’s improving ratings, which include additional teaching in IT.

The tour was delayed by the additional time the Prince spent talking to parents Cassandra Scaife and Kerry Pattinson, which included a question on what they as parents got out of the school.

Cassandra said: “The adult education courses they run have been very useful, especially when it comes to helping the kids with their maths homework.

“They give us a chance as parents to learn what the children are learning.”

Kerry Pattinson, who has a ten year old and two six-year children at the school, told the Prince that the improvement in recent years had been very clear.