The chief executive of Apple was in Scotland to accept the degree and participate in a fire side chat within Glasgow University's Bute Hall, taking questions from the audience.
Asked what he thought of the President's so called 'Muslim ban,' Cook stated: "If we stand and say nothing we become a part of it, our company thrives on diversity!"
It has been reported that Apple is considering suing over the ban which could affect its recruitment prospects in the US should it be enforced.
— Uni of Glasgow (@UofGlasgow) February 8, 2017
He was also asked about coding in education to which he responded: "Coding should be a required in schools. Our kids will never know any other environment other than the digital one." Cook also advised students never to work for money alone, saying that it would "run out fast or never be enough."
.@tim_cook looked up to and was inspired by Steve Jobs. pic.twitter.com/TGMwtmvBZh — Uni of Glasgow (@UofGlasgow) February 8, 2017
Earlier in the afternoon, Cook made a surprised visit to the Glasgow Apple Store where he took selfies with staff and customers.