Reference no: EM132278030
Remember the good old days when we played Pokemon Go? Complete the implementation of a Pokemon ADT below by filling out _add_pokemon, _evolve, and _evolve_all.
def make_gym(a, b, c, d):
"""Returns a pokemon gym (represented by list) of the four pokemons a, b, c, d."""
return [a, b, c, d]
def gym_size(gym):
"""Returns the size of the gym."""
return len(gym)
def make_pokemon_set():
"""Returns a dictionary of pokemon methods.
>>> my_pokemons = make_pokemon_set()
>>> my_pokemons["add"]("pikachu", "raichu")
>>> my_pokemons["evolve"]("charmander")
'charizard'
>>> my_pokemons["evolve"]("celebi")
'celebi'
>>> my_gym = make_gym("charmander", "celebi", "pikachu", "rattata")
>>> my_pokemons["evolve_all"](my_gym)
>>> my_gym
['charizard', 'celebi', 'raichu', 'raticate']
"""
pokemons = {"charmander":"charmeleon",
"charmeleon":"charizard",
"squirtle":"wartortle",
"wartortle":"blastoise",
"rattata":"raticate",
"sandshrew":"sandslash"}
def add(pokemon, evolution):
_add_pokemon(pokemons, pokemon, evolution)
def evolve(pokemon):
return _evolve(pokemons, pokemon)
def evolve_all(gym):
_evolve_all(pokemons, gym)
return {"add":add, "evolve":evolve, "evolve_all":evolve_all}
def _add_pokemon(pokemon_set, pokemon, evolution):
"""Takes in a pokemon and the form it evolves to and adds it to the pokemon
dictionary set.
"""
"*** YOUR CODE HERE ***"
def _evolve(pokemon_set, pokemon):
"""Takes in a pokemon and returns its final evolved form. Use the pokemon_set to check for
what the pokemon should evolve to. If the pokemon is not in the pokemon set, keeps its
status as is.
"""
"*** YOUR CODE HERE ***"
def _evolve_all(pokemon_set, gym):
"""Takes in a gym and evolve all the pokemons in the gym. You should be modifying the gym,
not returning a new gym. Use the evolve function you've defined above!
"""
"*** YOUR CODE HERE ***"
Please discuss dynamic programming
: Please discuss dynamic programming, greedy, and iterative improvement algorithm design technique with an example.
|
What is definition of strategic staffing
: What is definition of strategic staffing is, why it's important to staff strategically and how you will go about making sure that strategic staffing happens
|
Usability testing vs remote usability testing
: How do you compare face-to-face usability testing vs remote usability testing? How do you determine which method you should use, when and what for?
|
Discuss when the objectives should be measured
: Tasks: Using Microsoft PowerPoint, create an evaluation plan, which will be added to your PR strategy for Rock Pic School. In your evaluation plan.
|
Remember the good old days when we played pokemon go
: Remember the good old days when we played Pokemon Go? Complete the implementation of a Pokemon ADT below by filling out _add_pokemon, _evolve, and _evolve_all.
|
Describe marlows fascination with maps
: Analyze the paragraphs that describe Marlows fascination with maps. What kind of imagery is used to describe the particular map
|
Describe how a dr-bc audit might be conducted
: Review the entire document for any changes and improvements that you would like to make. Ensure that this final version of the plan is sufficiently detailed.
|
How flexibility saves time and stimulates response
: Explain, citing appropriate examples, how flexibility saves time and stimulates response.
|
How does the work apply to culture and society
: Throughout the semester we have seen that Art acts in response to and as a precursor to cultures, societies, and global issues. Art speaks to the identity.
|