Pandas Assignment
Purpose
Pandas is a software library written for the Python programming language for data manipulation and analysis.
In particular, it offers data structures and operations for manipulating numerical tables and time series.
Provided Starting Materials
You will be provided the following files.
Feel free to add functions as you please, but do not change the
main()
function.
Don't make any modifications to the other files, as you will not be turning this in.
Assignment
Your grandpa has just gotten into pokemon and spends every hour of every day playing.
He has now joined a pokemon fight club and asked you to write a program that will help him analyze his pokemon party for him.
Of course he wants to become the best and compete against other Pokemon players.
Therefore he want to test his Pokemon. To do this, you must create a battle simulator.
But he is old and does not know how battling works. So you can keep it simple.
Rules :
- The player is always the attacker!
- Ignore sub_types
- All enemy Pokemon's must be defeated to win the fight
- Enemy party is always randomly selected and of size 6
- At least one of your Pokemons have to survive to win
- Your Pokemon wins a fight, if the enemy Pokemon is no match against yours, based on the battletable
- Your Pokemon loses a fight, if the enemy Pokemon has a clear advantage
- If both are equal, you have a 50% chance to win the fight
Use the battletable to look up the type advantages.
- Your Pokemon is way stronger than the other Pokemon: Value > 0
- Your Pokemon is not a good match against the Enemy: Value < 0
- You and your enemies Pokemons are very equal: Value == 0
The specific details of each function are explained in the comments in the assignment4.py file.
Grading - 10 Points Possible
Your grade will be based on the four functions in the pandas.py file.
- 10 points : The addPokemon Function works correctly. (checks to see if the pokemon exist, and
party size is less than 6)
- 5 points : The removePokemon Function works correctly
- 5 points : printParty function works correctly
- 30 points: printStats works correctly
- 10 points : The height graph looks close to the example picture.
- 10 points : The weight graph looks close to the example picture.
- 10 points : The types graph looks close to the example picture.
- 40 points : The battle function works correctly
- 5 points : Create an enemy with 6 random pokemon
- 15 points : Compare two pokemon with the battle table, and correctly picks a winner.
- 15 points : The rules are implemented correctly.
- 5 points : the outcome prints in a nice format.(See sample below)
- 10 points : The Python code is properly commented, easy to understand and doesn't contain significant redundancies.
Hints:
Here is an example of the expected graph result:
And here how a battle report could look like:
ROUND #1 Start!
#--------------------#
charmander VS. cyndaquil
You won the battle!
ROUND #2 Start!
#--------------------#
charmander VS. cacturne
You lost the battle!
ROUND #3 Start!
#--------------------#
arbok VS. cacturne
You lost the battle!
You lost the fight, better luck next time!