Program 4: Pokédex
Logistics
- Due Date: Friday, March 15th no later than 11:59 p.m.
- Partner Information: You may complete this assignment
individually or with exactly one partner. If you work with a partner,
you must both be enrolled in the same lab section or you
will both lose 10 points.
- Submission Instructions (working alone): Upload your solution, entitled
YourFirstName-YourLastName-Program4.py to the BrightSpace
Program 4 Dropbox.
- Submission Instructions (working with one lab mate):
Upload your solution, renamed to
YourFirstName-YourLastName-PartnerFirstName-PartnerLastName-Program4.py
to the BrightSpace Program 4 Dropbox.
Note: If you work with a partner, only one person needs to submit
a solution. If you both submit a solution, the submission that will
be graded is the one from the partner whose last name comes
alphabetically first.
- Deadline Reminder:
Once the submission deadline passes, BrightSpace will no
longer accept your Python submission and you will no longer
be able to earn credit. Thus, if you are not able to fully complete
the assignment, submit whatever you have before the deadline so that
partial credit can be earned.
Learning Outcomes
- To solve this problem, you need to understand the following
Python concepts: object-oriented programming and lists.
Background Information
- The file pokedex.txt contains partial
information about 31 Pokémon that mostly come from this
Pokédex.
Assignment
- Using pokedex.py as a starting point,
supply the missing functions such that interaction with a user could
produce this transcript.
Grading - 100 points
- 20 points. The class Pokemon is defined (2 points) with
the appropriate six methods (3 points each).
- 5 points. The function print_menu is correct.
- 10 points. The function print_pokedex is correct.
- 10 points. The function lookup_by_name is correct when the
Pokémon is present (7 points) and absent (3 points).
- 10 points. The function lookup_by_number is correct when the number
is present (7 points) and absent (3 points).
- 10 points. The function total_by_type is correct when the
type is present (7 points) and absent (3 points).
- 10 points. The function average_hit_points is correct.
- 10 points. The format of the output matches the format of the
output in the transcript exactly. (2 points for each type of difference
up to 10 points.)
- 15 points - The Python solution is properly commented,
easy to understand and does not contain unnecessary code.
(3 points for each type of improvement up to 15 points.)