-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
beginnerFor first time contributorsFor first time contributorsgood first issueGood for newcomersGood for newcomers
Description
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
abilitiesarray 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
nameandis_hiddenproperty - Use a loop to go through all abilities
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
beginnerFor first time contributorsFor first time contributorsgood first issueGood for newcomersGood for newcomers