Question: #The line below will open a file containing information #about every pokemon through Generation 7: pokedex = open('../resource/lib/public/pokedex.csv', 'r') #We've also provided a sample subset

#The line below will open a file containing information #about every pokemon through Generation 7:

pokedex = open('../resource/lib/public/pokedex.csv', 'r')

#We've also provided a sample subset of the data in #sample.csv. # #Each line of the file has 13 values, separated by commas. #They are: # # # - Number: The numbered ID of the Pokemon, an integer # - Name: The name of the Pokemon, a string # - Type1: The Pokemon's primary type, a string # - Type2: The Pokemon's secondary type, a string (this # may be blank) # - HP: The Pokemon's HP statistic, an integer in the range # 1 to 255 # - Attack: The Pokemon's Attack statistic, an integer in # the range 1 to 255 # - Defense: The Pokemon's Defense statistic, an integer in # the range 1 to 255 # - SpecialAtk: The Pokemon's Special Attack statistic, an # integer in the range 1 to 255 # - SpecialDef: The Pokemon's Special Defense statistic, an # integer in the range 1 to 255 # - Speed: The Pokemon's Speed statistic, an integer in the # range 1 to 255 # - Generation: What generation the Pokemon debuted in, an # integer in the range 1 to 7 # - Legendary: Whether the Pokemon is considered "legendary" # or not, either TRUE or FALSE # - Mega: Whether the Pokemon is "Mega" or not, either TRUE # or FALSE # #Use this dataset to answer the questions below.

#Here, add any code you want to allow you to answer the #questions asked below over on edX. This is just a sandbox #for you to explore the dataset: nothing is required for #submission here.

How many Pokemon have only one type? In other words, for how many Pokemon is Type2 blank? unanswered

#The line below will open a file containing information #about every pokemon

What is the most common type? Include both Type1 and Type2 in your count. unanswered

What Pokemon has the highest HP statistic? unanswered

Excluding Pokemon that are either Mega or Legendary, what Pokemon has the highest Defense statistic? unanswered

Among Legendary Pokemon, what is the most common type? Include both Type1 and Type2 in your count. unanswered

In terms of the sum of all six stats (HP, Attack, Defense, Special Attack, Special Defense, and Speed), what is the weakest Legendary Pokemon? If there is a tie, list any of the tying Pokemon. unanswered

In terms of the sum of all six stats (HP, Attack, Defense, Special Attack, Special Defense, and Speed), what is the strongest non-Legendary, non-Mega Pokemon? If there is a tie, list any of the tying Pokemon. unanswered

What type has the highest average Speed statistic? Include both Type1 and Type2 in your calculation. unanswered

Rounded to the nearest integer, what is that highest average Speed statistic? Include both Type1 and Type2 in your calculation. unanswered

through Generation 7: pokedex = open('../resource/lib/public/pokedex.csv', 'r') #We've also provided a sample

Among all 7 Pokemon generations, which generation had the highest average sum of all six stats (HP, Attack, Defense, Special Attack, Special Defense, and Speed)? unanswered

subset of the data in #sample.csv. # #Each line of the file

Rounded to the nearest integer, how much higher was that statistic than the next-closest generation's average sum of all six stats (HP, Attack, Defense, Special Attack, Special Defense, and Speed)? unanswered

has 13 values, separated by commas. #They are: # # # -

Rounded to the nearest integer, how much higher is the average sum of all six stats among Mega Pokemon than their non-Mega versions? Note that Mega Pokemon share the same Number (the first column) as their non-Mega versions, which will allow you to find all Pokemon that have a Mega version.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!