Description
Add Pokémon abilities to the display output.
Current Behavior
PyDex doesn't show Pokémon abilities.
Expected Behavior
Display all abilities for the Pokémon, including hidden abilities.
Example Output
Name: Pikachu
National Pokédex Number: 25
Type(s): Electric
Abilities: Static, Lightning Rod (hidden)
Implementation Steps
- Find the
abilities array in the JSON response
- Loop through the abilities and extract the ability names
- Check if an ability is hidden (look for
is_hidden: true)
- Format the output nicely
Skills Required
- Basic Python knowledge
- Understanding of loops and lists
- Working with JSON data
What You'll Learn
- Iterating through arrays in JSON
- Conditional logic in Python
- String formatting and concatenation
Testing
Test with these Pokémon:
python pokedex.py pikachu (has hidden ability)
python pokedex.py charizard (multiple abilities)
python pokedex.py ditto (simple ability)
Hints
- Look for
data['abilities'] in the JSON response
- Each ability has a
name and is_hidden property
- Use a loop to go through all abilities
Description
Add Pokémon abilities to the display output.
Current Behavior
PyDex doesn't show Pokémon abilities.
Expected Behavior
Display all abilities for the Pokémon, including hidden abilities.
Example Output
Implementation Steps
abilitiesarray in the JSON responseis_hidden: true)Skills Required
What You'll Learn
Testing
Test with these Pokémon:
python pokedex.py pikachu(has hidden ability)python pokedex.py charizard(multiple abilities)python pokedex.py ditto(simple ability)Hints
data['abilities']in the JSON responsenameandis_hiddenproperty