English, asked by sreekanthreddy1131, 24 days ago

Find latitude and longitude of utmost 20 countries, ordered by population, with a population greater or equal to the population limit given below and have atleast one currency exclusively for themselves. (countries like Madagascar, Sri Lanka but not India, USA). Use the country details from this dataset.
Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.
Assume radius of earth: 6371 km
Round length of each line and final result to 2 decimal points
If co-ordinates are missing for any country use 0.000 N 0.000 E

Answers

Answered by ravilaccs
2

Answer:

The Program are solved with the solution

Explanation:

  • Latitude lines are a series of horizontal arcs that extend 90 degrees from east to west. Degrees are used to describe these angular lines (1 degree = 60 nautical miles = 60*1.852 kilo metres). Degree is further divided into 60 minutes and 60 seconds in one minute.
  • As a result, one second equals 30.86 metres, and one minute is equal to one nautical mile (1.852 kilometres or 1852 metres). There are 90 latitude lines that divide the entire planet, ranging from 0 to 90 degrees.
  • On this earth map, the equator is represented by the zero degree latitude arc that circles the globe from east to west. The north pole is represented by the 90 degree north line, and the south pole is represented by the 90 degree south line.
  • The area between these latitude lines, measured in terms of its distance from the equator. For example, 45 degrees north indicates that the location is 45 degrees north of the equator. The North and South hemispheres of the Earth are separated by the equator.
  • Similar to latitude lines, 180 vertical angular lines that run perpendicular to latitude lines from pole to pole also divide the Earth. The Earth is divided into an eastern and a western region by these hypothetical longitudinal lines. Geographic experts believe that the city of Green Witch in the United Kingdom serves as the midpoint of the planet. The longitudinal measurement of any location indicates the distance from the meridian, and the virtual ongoing longitude line is considered to be a "meridian" line. For instance, 100 degrees east indicates that the location is 100 degrees away from the earth in the east.
  • Measurement of the geographic address: Latitude and longitudinal lines are combined to determine the precise geographic address of any location.

Population limit: 65110000

Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.

Program

From math import pi, sin, cos, sqrt, asin, atan2

populationLimit = 65110000;

r = 6371000;

allCountries = []

countries = []

for country in allCountries:

   if country['population'] >= populationLimit and len(country['curencies']) > 1:

       countries.append(country)

       if len(countries) == 20:

           break;

total = 0;

for i in range(len(countries)):

   for j in range(1, len(countries)):

       fi1 = countries[i]['latitude'] * pi / 180

       fi2 = countries[j]['latitude'] * pi / 180;

       dFi = (countries[j]['latitude'] - countries[i]['latitude']) * pi / 180;

       dLam = (countries[j]['longitude'] - countries[i]['longitude']) * pi / 180;

       a = sin(dFi / 2) * sin(dFi / 2) + cos(fi1) * cos(fi2) * sin(dLam / 2) * sin(dLam / 2);

       c = 2 * atan2(sqrt(a), sqrt(1 - a))

       total += r * c;

       print("Total distance:", total / 1000);

Program 2

Assume radius of earth: 6371 km

Round length of each line and final result to 2 decimal points

If co-ordinates are missing for any country use 0.000 N 0.000 E

Population limit: 28875

Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit

import requests

import csv

rows = []

eligible_countries = []

url = input('Webpage to grab source from: ')

html_output_name = input('Name for html file: ')

req = requests.get(url, 'html.parser')

with open(html_output_name, 'r') as f:

   f.read(req.text)

for row in req.text:

   rows.append(row)

input = int(input("Please enter the limit of population: "))

eligible_countries = []

for i in rows:

 if source[i][2] < input:

   eligible_countries.append(rows[i])

print(eligible_countries)

f.close()

source = []

Answered by sourasghotekar123
1

Explanation:

Scope lines or lattitudes are a progression of flat curves that stretch out 90 degrees from east to west. Degrees are utilized to depict these rakish lines (1 degree = 60 nautical miles = 60*1.852 kilo meters). Degree is additionally separated into an hour and 60 seconds in a single moment.

Therefore, one second equivalents 30.86 meters, and one moment is equivalent to one nautical mile (1.852 kilometers or 1852 meters). 90 scope lines partition the whole planet, going from 0 to 90 degrees.

On this planet map, the equator is addressed by the zero degree scope circular segment that circles the globe from east to west. The north pole is addressed by the 90 degree north line, and the south pole is addressed by the 90 degree south line.

The region between these scope lines, estimated concerning its separation from the equator. For instance, 45 degrees north demonstrates that the area is 45 degrees north of the equator. The North and South halves of the globe of the Earth are isolated by the equator.

Like scope lines, 180 vertical rakish lines that run opposite to scope lines from one post to another additionally partition the Earth. The Earth is partitioned into an eastern and a western locale by these speculative longitudinal queues. Geographic specialists accept that the city of Green Witch in the Unified Realm fills in as the midpoint of the planet. The longitudinal estimation of any area shows the separation from the meridian, and the virtual continuous longitude queue is viewed as a "meridian" line. For example, 100 degrees east shows that the area is 100 degrees from the earth in the east.

Estimation of the geographic location: Scope and longitudinal queues are joined to decide the exact geographic location of any area.

#SPJ2

https://brainly.in/question/23723548?source=quick-results&auto-scroll=true&q=lattitudes%20

Similar questions