Get startedGet started for free

Working with keywords

Working with the genre_sales dictionary again, this time you will apply multiple conditions simultaneously to find out information about book genres and average sales!

This exercise is part of the course

Introduction to Python for Developers

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Loop through the dictionary
____ genre, sale ____ ____.____():
  
  # Check if genre is Horror or Mystery
  if ____ _____ "_____" _____ _____ _____ "_____":
    print(genre, sale)
Edit and Run Code