def make_ gym/a , b , c , d ) . Returns a pokemon gym ( represented by List ) of the four pokemons a , b , C , d....
_add_pokemon_evolveand _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 la , 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 _ a [ ] " ] ( my _ gym )> > > my _ gym[ ' charizard ' , ' celebi ' , ' raichu ' , ' raticate ' ]1/11 11pokemons = {" charmander " : " charmeleon " ," charmeleon " : " charizard " ," squirtle " : " wartortle " ," wartortle " : " blastoise " ," rattata" : " raticate " ," sandshrew " : " sands lash " ]def add ( pokemon , evolution ) :_add_ pokemon ( pokemons , pokemon , evolution )def evolve ( pokemon )*return _ evolve ( pokemons , pokemon )
Show more