Question: Help with fixing my code. When looping in reverse order, I cannot figure out how to fix it starting at number 8 instead of 1
Help with fixing my code. When looping in reverse order, I cannot figure out how to fix it starting at number instead of and it is spelling out number instead of listing out the pokemons
#creating a tuple with the names of pokemon
PokemonPikachu 'Charmander', 'Caterpie', 'Bulbasaur', 'Squirtle', 'Eevee', 'Vulpix', 'Ponyta', 'Arcanine', 'Weedle', 'Pidgey', 'Rattata', 'Ekans', 'Sandshrew', 'Clefairy'
#print using single statement
printPokemon: Pokemon
#looping and printing each state using the f strings
for Pokemon in Pokemon:
printfYes I just caught Pokemon
#looping in reverse order using format method
for i in rangelenPokemon:
print is Pokemon # I caught!formatPokemoni i
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
