The Student Room Group

Computer Science Replit, python code

I have been tasked with writing my own code on replit using python which shows every city in the world, its longitude and latitude and if it is North, South, East, or West of London. I have no idea where to start and need help.
(edited 10 months ago)
Reply 1
Original post by kee130
I have been tasked with writing my own code on replit using python which shows every city in the world, its longitude and latitude and if it is North, South, East, or West of London. I have no idea where to start and need help.

I would start by compiling a list of world cities, their lat and longs.
Then, which data structure will you use to store that data.
Then what calculation do you need to do to work out their position to London.
The iterate through each city outputting the answer for each.

Quick Reply

Latest

Trending

Trending