Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#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

image text in transcribed

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

image text in transcribed

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

image text in transcribed

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

image text in transcribed

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

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

How will the members be held accountable?

Answered: 1 week ago

Question

a. Do team members trust each other?

Answered: 1 week ago