Remember the good old days when we played pokemon go

Assignment Help Basic Computer Science
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 ***"

Reference no: EM132278030

Questions Cloud

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.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd