Skip to content

Write a new noise utility to play a sound randomly #7

Description

@nickmckay

Following the same format as other functions in noises.py, write a function for random_noise(). This function will play one of the five cat noise mp3 files in the sound folder randomly.

  • Write the random function in noises.py
  • Incorporate the function in Cat class using the existing function Cat.make_noise. Use parameter noise = "random". Look at how meowing is already incorporated.
  • Edit the docstrings for this function to reflect the new sound
  • Create a test for the new function. Note that since this function already exists, it already has tests. Reuse as much as possible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions