Not sure why my query doesn't run though the syntax is correct

Screen Link:
https://app.dataquest.io/m/463/joining-data-in-sql/7/combining-joins-with-subqueries

My Code:

SELECT cities.name AS capital_city, facts.name AS country, cities.population
FROM facts
INNER JOIN (
            SELECT * FROM cities
            WHERE capital = 1 AND population > 10000000
            ) c ON c.facts_id = facts.id
ORDER BY 3 DESC 
LIMIT 10; 

What I expected to happen: So I get that the LIMIT 10 wasn’t required by the question and that’s why my code is wrong, but I still expected it to run. I don’t get why it didn’t run and outputted an error.

What actually happened:

(sqlite3.OperationalError) near "FROM": syntax error
[SQL: SELECT cities.name AS capital_city, facts.name AS country, cities.population, FROM facts INNER JOIN (             SELECT * FROM cities             WHERE capital = 1 AND population > 10000000             ) c ON c.facts_id = facts.id ORDER BY 3 DESC  LIMIT 10;]
(Background on this error at: http://sqlalche.me/e/13/e3q8)

TL;DR: I input code inclusive of the correct answer with an excessive LIMIT 10 that the question didn’t ask for; expected output; instead, got an error. Why?

I just tried your above code and got a different error:

(sqlite3.OperationalError) no such column: cities.name
[SQL: SELECT cities.name AS capital_city, facts.name AS country, cities.population FROM facts INNER JOIN (             SELECT * FROM cities             WHERE capital = 1 AND population > 10000000             ) c ON c.facts_id = facts.id ORDER BY 3 DESC  LIMIT 10;]
(Background on this error at: http://sqlalche.me/e/13/e3q8)

which is a much easier error to figure out: the cities table has been aliased as c and therefore runs without error when changed to:

SELECT c.name AS capital_city, facts.name AS country, c.population
FROM facts
INNER JOIN (
            SELECT * FROM cities
            WHERE capital = 1 AND population > 10000000
            ) c ON c.facts_id = facts.id
ORDER BY 3 DESC 
LIMIT 10; 

Have you tried the button on the bottom of the screen (ie Restore Initial Code)? Sounds like a glitch and should be easily fixed with a refresh.