Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

we'll see how long it actually takes to catch'em all! You are given a file data/pokemon.txt which contains information about several (fictional) Pokemon, such

 

 

    

we'll see how long it actually takes to "catch'em all"! You are given a file data/pokemon.txt which contains information about several (fictional) Pokemon, such as their encounter rate and catch rate. The data for this problem follows the following format. Col 1: pokemon id: A unique identifier for the Pokemon. Col 2: is legendary: A 1 if the Pokemon is legendary, and 0 otherwise. Col 3: height: The height of the Pokemon in meters. Col 4: weight: The weight of the Pokemon in kilograms. Col 5: encounter prob: The probability of encountering this Pokemon in the wild grass. Note the sum of this entire column is 1, since when you make an encounter, exactly one of these Pokemon appears. Col 6: catch prob: Once you have encountered a Pokemon, the probability you catch it. (Ignore any mechanics of the actual game if you've played a Pokemon game in the past.) code for the following parts in the provided file: pokemon py You'll need to implement the following functions: part a: Compute the proportion of Pokemon that are legendary, the average height, the average weight, the average encounter prob, and average catch prob. part b: Compute the proportion of Pokemon that are legendary, the average height, the average weight, the average encounter prob, and average catch prob OF ONLY those Pokemon STRICTLY heavier than the median weight. part c: Suppose you are walking around the wild grass, and you wonder: how many encounters do you expect to make until you ENCOUNTER each Pokemon (at least) once? part d: Suppose you are walking around the wild grass, and you wonder: how many encounters do you expect to make until you CATCH each Pokemon (at least) once? - For part c and part d, you need to consider that the probability to encounter/catch each pokemon is different. - When you need to use random function, use system random function with seed = 1 Data: 00 0 83.5668 10.9318 0.0404 0.7294 01 0 10.9272 19.8540 0.0414 0.7872 02 0 74.5917 1.6116 0.0308 0.7550 03 0 36.3698 8.2771 0.0320 0.9591 04 0 36.2514 1.7335 0.0551 0.8247 051 61.1192 1.8982 0.0353 0.8299 06 0 39.6811 1.0984 0.0526 0.4059 07 0 41.2027 2.2682 0.0323 0.6624 08 0 51.2353 6.0732 0.0314 0.9112 09 0 71.1597 15.8267 0.0366 0.3455 10 0 96.0724 46.9102 0.0363 0.4553

Step by Step Solution

3.55 Rating (159 Votes )

There are 3 Steps involved in it

Step: 1

Part A Question Explain the code in parta and how it computes various statistics The parta function computes several statistics for Pokmon data Proportion of Legendary Pokmon Average Height Average We... 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

Management Accounting Information for Decision-Making and Strategy Execution

Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young

6th Edition

137024975, 978-0137024971

More Books

Students also viewed these Programming questions

Question

What are the steps for designing a control chart?

Answered: 1 week ago