Answer to Question #285326 in Python for Harshinj

Question #285326

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.



Population limit:84497

1
Expert's answer
2022-01-07T07:45:06-0500
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 = []

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS