Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How i provide it import csv covid_data = [] with open('covid_data.txt', newline = '') as covid: txt_reader = csv.reader(covid, delimiter='t') for row in txt_reader: covid_data.append(row)

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
How i provide it
import csv covid_data = [] with open('covid_data.txt', newline = '') as covid: txt_reader = csv.reader(covid, delimiter='\t') for row in txt_reader: covid_data.append(row) I How many items are in the covid_data list? I will add a len() to count the number of items. [9]: # print("The", len(covid_data), "represent the number of covid items") I The 192 represent the number of covid items Using the type function that we used in Week 2 please determine the type of each item in covid_dat item in the list. We covered this in class in Week 4 Am using the for loop & the Type that determine the type of each items. [18]: # items = 192 for i in range(1,193): print("the type of item", i, type(items)) the type of item 1 the type of item 2 the type of item 3 the type of item 4 the type of item 5 the type of item 6 Create a new list called asia_countries Using a for loop along with an if statement go through the cavid_data list and store all the countries from Asia in this new asia_countries . At the end please print out the number of countries in the asia_countries list, 171: M#student code for tosh goes below. >> . Create a new list called highest_ten_deaths Store the countries that are in the highest 10 deaths per million from the covid_data 20]: # import csv covid_data = [] with open('covid_data.txt', newline = '') as covid: txt_reader = csv.reader(covid, delimiter='\t') for row in txt_reader: covid_data.append(row) I How many items are in the covid_data list? I will add a len() to count the number of items. [9]: # print("The", len(covid_data), "represent the number of covid items") I The 192 represent the number of covid items Using the type function that we used in Week 2 please determine the type of each item in covid_dat item in the list. We covered this in class in Week 4 Am using the for loop & the Type that determine the type of each items. [18]: # items = 192 for i in range(1,193): print("the type of item", i, type(items)) the type of item 1 the type of item 2 the type of item 3 the type of item 4 the type of item 5 the type of item 6 Create a new list called asia_countries Using a for loop along with an if statement go through the cavid_data list and store all the countries from Asia in this new asia_countries . At the end please print out the number of countries in the asia_countries list, 171: M#student code for tosh goes below. >> . Create a new list called highest_ten_deaths Store the countries that are in the highest 10 deaths per million from the covid_data 20]: #

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Which phone app do you use the most?

Answered: 1 week ago