What are the best coding classes in Edinburgh?
Scotland's Census 2022 counted about 512,700 usual residents in the City of Edinburgh, up from 476,626 in 2011, and 70.3% of them were aged 15 to 64 against 64.6% across Scotland. The city has had a Royal Observatory since 1822, first on Calton Hill and since 1896 on Blackford Hill. Modern Age Coders teaches Edinburgh learners aged six to sixty-seven in live online lessons, one to one or in a group of five to ten at one level, with teachers based in India and lesson times fixed in UK hours. The first lesson is free. From the second month on, a group place is USD 100 and private teaching USD 150, each per month.
On Edinburgh's longest day in 2026 the sun is above the horizon for 17 hours 37 minutes, about an hour longer than in London; on the shortest it manages 6 hours 57 minutes. For 96 nights, from 4 May to 7 August, the sky never becomes truly dark, because the sun never sinks the 18 degrees below the horizon that astronomers call astronomical darkness. At midsummer it dips only 10.6 degrees. All of that follows from a few lines of spherical trigonometry: the sun's position in the sky, the time of day and Edinburgh's latitude of almost 56 degrees north. We wrote a program that works out the sun's height every minute of every day of the year, then checked its sunrises and sunsets against the United States Naval Observatory. On every date tested it agreed to within a minute. Building that model, and proving it right, is the lesson Edinburgh's sky teaches our teenage learners.
Facts last verified 21 September 2026. Teaching is online; no Edinburgh branch is claimed.
Let the learner's interests guide the choice. Every course starts with a free live lesson, and no card is needed.

Python and turtle graphics for 9 to 12 year olds, where a drawing of the sun climbing and setting is a natural first model.
See the syllabus
Geometry, angles and coordinates built in Python, the groundwork for any calculation of where the sun is.
See the syllabus
Algebra to calculus with trigonometry at its heart, the mathematics inside every sunrise calculation.
See the syllabus
Python from zero to advanced for adults, with models checked against real published data as a habit from the start.
See the syllabusBrowse the course atlas for more than one hundred options and use the coding roadmap to check prerequisites.
The four we are known for
These run underneath everything above. Every one is live and online, placed by ability rather than by age, and the first class is free.

Python, web and AI projects where the learner still owns the thinking.
See the syllabus
Automate the work you already do, then let AI carry part of it.
See the syllabus
Train a model, read what it learned, and be able to say why it is wrong.
See the syllabus
Run AI coding agents on real work without losing control of the codebase.
See the syllabusFrom Scotland's Census 2022, published by National Records of Scotland. Counts are rounded to the nearest hundred, so they are quoted as published and never added together.
| Measure | Edinburgh | Scotland |
|---|---|---|
| Usual residents, rounded | 512,700 | 5,436,600 |
| Usual residents in 2011 | 476,626 | Not compared |
| Households, rounded | 238,900 | Not compared |
| Aged 20 to 24, rounded | 48,600 | 337,000 |
| Share aged 0 to 14 | 13.7% | 15.3% |
| Share aged 15 to 64 | 70.3% | 64.6% |
| Share aged 65 and over | 16.0% | 20.1% |
| Residents per square kilometre | 1,946.5 | 69.8 |
People aged 15 to 64 made up 70.3% of Edinburgh's residents in 2022, compared with 64.6% for Scotland as a whole.
Children aged 0 to 14 were 13.7% and people aged 65 and over 16.0%, both below Scotland's 15.3% and 20.1%.
With 1,946.5 residents per square kilometre, Edinburgh is far denser than Scotland's average of 69.8.
National Records of Scotland also reports that 21.1% of Edinburgh households had dependent children in 2022. Learners here can be at any stage, from a P5 pupil in Portobello making a first animation to an S4 student in Corstorphine working towards National 5 Computing Science, or an adult in Leith learning Python for work, and each joins a group of five to ten at their own level.
From the Royal Observatory Edinburgh and Historic Environment Scotland.
The Royal Observatory Edinburgh says astronomy has been taught in the city since the town's college opened in 1583, and that the University's first Chair of Astronomy was established in 1786.
Calton Hill became the Royal Observatory during George IV's visit to Scotland that year. In 1834 Thomas Henderson became the first Astronomer Royal for Scotland; the Observatory calls him the first astronomer to measure parallax and so the distance to the stars.
A new Royal Observatory on Blackford Hill came into being. Today it brings together a university astronomy research group, a UK research council establishment and a visitor centre on a single site.
Down in the city, Historic Environment Scotland describes St Margaret's Chapel in Edinburgh Castle, built by King David I in honour of his mother Queen Margaret, who died at the castle in 1093, as Edinburgh's oldest building. We have no connection with the Royal Observatory, the University of Edinburgh or Historic Environment Scotland. We mention them because Edinburgh has been calculating the sky for centuries, and the project on this page is a small, modern piece of that tradition.
The authority we checked against
The United States Naval Observatory publishes sunrise and sunset times for any place and date through its Astronomical Applications service. We compared our program with it at Edinburgh Castle on six dates across 2026, twelve times in all, and the largest disagreement was one minute.
Solar geometry turns the date, the time and a latitude into the sun's height above or below the horizon. We ran it for every minute of 2026 at Edinburgh Castle.
| Measure | Result |
|---|---|
| Longest day, around the June solstice | 17 hours 37 minutes |
| Shortest day, 21 December | 6 hours 57 minutes |
| London on 21 June and 21 December | 16 hours 38 minutes and 7 hours 50 minutes |
| Lowest sun at midsummer | 10.6 degrees below the horizon |
| Nights without astronomical darkness | 96, from 4 May to 7 August |
| Nights when the sun stays within 12 degrees of the horizon | 40, from 1 June to 10 July |
| Largest gap from the Naval Observatory | 1 minute, across 12 times tested |
Two angles fix it: the declination, which swings between about 23.4 degrees north and south over the year, and the hour angle, which turns 15 degrees every hour.
One line of spherical trigonometry combines those angles with Edinburgh's latitude, 55.95 degrees north, to give the sun's height at any moment.
Step through every minute of every day, note where the height crosses the sunrise line, and compare the times with the Naval Observatory's.
At midsummer the sun passes only 10.6 degrees below Edinburgh's northern horizon at the darkest point of the night. Astronomers need it 18 degrees down for true darkness, so for 96 nights the sky never quite goes black, and for 40 nights around midsummer the sun never even reaches 12 degrees down. London, about 4.4 degrees further south, loses astronomical darkness on only 60 nights and gets past 12 degrees every night of the year.
Two details decide whether the program agrees with the observatory. Sunrise is defined as the moment the top edge of the sun appears, allowing for the air bending its light, which puts the sun's centre 0.833 degrees below the horizon; use zero instead and every day comes out 12 to 16 minutes too short. And times need one clock: the program works in UTC and converts to British Summer Time only for display, because mixing the two silently shifts half the year by an hour.
Learned on sunrise times, used afterwards on satellite passes, solar panel planning, navigation apps, game physics and any program that turns angles into positions.
| Check | What it looks like | What it prevents |
|---|---|---|
| Test against an authority | Compare with an independent published source such as the Naval Observatory | A confident answer nobody has checked |
| Use one clock | Compute in UTC and convert only when displaying | Half the year silently out by an hour |
| Define the event | State what sunrise means, including the 0.833-degree allowance | Answers that differ by minutes for no visible reason |
| Handle the edge cases | Allow for nights when the sun never reaches a threshold at all | Programs that crash or invent a time on midsummer nights |
| Report the precision | Say the model agrees to within a minute, and claim no more | Seconds printed that the method cannot support |
The fourth check is where Edinburgh differs from cities further south. On midsummer nights here the sun simply never reaches 12 degrees below the horizon, so a program asking when nautical twilight ends has no answer to give. Code written and tested only in London would never meet that case; Edinburgh learners meet it in their first week.
Shadows measured in the playground through the day, and a short program that draws the sun rising and setting.
The solar formulas coded in Python, a whole year computed, and every answer checked against the Naval Observatory.
Physical models at work, from energy to logistics, validated against published data before anyone relies on them.
We are not connected with National Records of Scotland, the Royal Observatory Edinburgh, Historic Environment Scotland or the United States Naval Observatory. The census data and observatory times are published for public use; the model and its results are our own work.
Ages are a first guess only; the free lesson settles the real level.
Watching shadows shorten and lengthen, timing daylight through the seasons and animating a simple sunrise.
Elementary Maths for Grades 1-5Coding for KidsDegrees, compass bearings and clocks, and a first program that turns an angle into a position on screen.
Maths Through CodingMiddle School Mathematics MasteryTrigonometry turned into code, a year of sunrises computed and a model tested against an authority.
High School MathematicsPython for TeensScientific and engineering calculations built carefully, with precision stated and validation part of the job.
College Maths CoursePython MasterclassBecause knowing how an answer is made is the only way to know when it is wrong.
Every weather app shows sunrise and sunset, and an AI assistant will quote them in a moment. Ask why Edinburgh's June nights stay pale, though, or how the app decides the instant of sunrise, and a good answer needs the geometry underneath: declination, hour angle, a latitude of almost 56 degrees and a 0.833-degree allowance for the air. A learner who has built the calculation can check the app, and can spot an answer that is out by an hour because someone mixed up clocks.
The same skills run through a great deal of software. Satellite tracking, solar panel planning, navigation and game physics all turn angles into positions with trigonometry and then check the results against measurement. Validating a model against an authority, as this project does with the Naval Observatory, is exactly how serious scientific code earns trust.
So an Edinburgh teenager should still learn to program in 2026, in a city with a Royal Observatory since 1822: answers are cheap now, and the ability to build a model and prove it right is what makes a programmer worth trusting. The longer argument is in why learning to code still matters in 2026.
Edinburgh's hills and cobbles slow down every journey; a live online lesson skips the journey entirely.
A learner in Stockbridge and another in Gilmerton can share a lesson without either crossing the city.
P1 to P7, S1 to S6, National 5, Higher and Advanced Higher: we use the stage names Edinburgh schools use, and every lesson is in English.
The free lesson covers a real task and ends by recommending a level, a course and a weekly time. No card details are needed.
Five to ten learners at one stage, from Edinburgh, elsewhere in the UK and abroad, so every level has a slot that works.
Two lessons a week at the same times, around eight a month, with holiday and exam breaks agreed with the teacher in advance.
India Standard Time never shifts, so our teachers are four and a half hours ahead of Edinburgh in British Summer Time and five and a half in winter; after-school and evening lessons fall inside their day.
Across the Lothians
Families in Musselburgh, Dalkeith or Livingston join exactly the same groups, because every lesson is online and groups are formed by level rather than postcode.
A free first lesson and then one monthly price.
A full lesson at no cost, ending with a level, a recommended course and a proposed weekly time.
Around eight live lessons a month, with five to ten learners working at one level.
Around eight live lessons a month for one learner and one teacher.
Families outside India all pay the same US dollar fee, so Bruntsfield and Craigmillar pay exactly the same, and we do not publish prices in pounds. Nothing is billed until the free lesson has agreed a course and a time, and the pricing page covers pauses, missed lessons and moving between group and one-to-one teaching.
Rated 4.9 across 547 Google reviews. These are real reviews, reproduced as written.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
We match the first task to the learner: shadows and an animated sunrise for a young child, a first Python program that works with angles, or a full year of Edinburgh sunrises checked against the Naval Observatory for a teenager ready for real science.
The questions Edinburgh families ask us most.
Scotland's Census 2022 counted about 512,700 usual residents in the City of Edinburgh, rounded to the nearest hundred, compared with 476,626 in 2011. There were about 238,900 households.
In 2022, 70.3% of Edinburgh residents were aged 15 to 64, against 64.6% across Scotland, while 13.7% were aged 0 to 14 and 16.0% were 65 or over.
Because at midsummer the sun dips only about 10.6 degrees below the horizon. True astronomical darkness needs 18 degrees, so on our calculation for 2026 it never arrives on 96 nights, from 4 May to 7 August.
About 17 hours 37 minutes of sun above the horizon around the June solstice in 2026, roughly an hour more than London, and about 6 hours 57 minutes on 21 December.
The first Astronomer Royal for Scotland, appointed in 1834, whom the Royal Observatory Edinburgh describes as the first astronomer to measure parallax and determine the distance to the stars. We are not connected with the Observatory.
We use the Scottish stage names and support learners working towards National 5 and Higher Computing Science; our National 5 and Higher pages explain the courses. All teaching is in English.
After school, in the evening or at weekends, at a UK time chosen during the free lesson. Our teachers are four and a half hours ahead in summer and five and a half in winter.
No. There is no Edinburgh centre and no premises anywhere in the UK; every lesson is taught live online. Learners need a computer with sound and a reliable connection, and our phone number is based in India.
The first lesson is free. After that a group place is USD 100 a month for two live lessons a week, about eight a month, with five to ten learners, and one-to-one lessons on the same timetable are USD 150 a month. Course, format and time are agreed before any charge.
By level, pace and aims rather than age or postcode, with five to ten learners at one stage. If no group meets at a suitable time, we offer one-to-one lessons instead.
The Scotland guide explains coding across the Curriculum for Excellence, and exam help lives on the National 5 Computing Science and Higher Computing Science pages. South of the border, Newcastle upon Tyne colours its wards with four colours. Every UK page is linked from the UK coding page.