Modules

guginator

class guginator.UserInputError

Raised when input provided by the user is invalid or inappropriately formatted, preventing the program from proceeding.

guginator.food(args)

Determine which food to feed Gug for a given day of the week.

Parameters:args (argparse.Namespace) – A Namespace object. args.day should be a day of the week. It must be a str.
Returns:A message explaining what to feed Gug
Return type:str
Raises:UserInputError – if args.day is not a valid day of the week
guginator.walk(args)

Calculates the east-west and north-south Manhattan distances traveled by walking Gug through the Downtown section of the Tri-State Area.

The path provided must be a list of coordinates as strings with format x,y, where x and y are integers corresponding to the x- and y-coordinates of a map of Downtown.

Parameters:args (argparse.Namespace) – A Namespace object. args.path should be a list of x,y coordinates as str.
Returns:A tuple of the form (east-west distance, north-south distance)
Return type:tuple of int
Raises:UserInputError – if args.path contains invalid coordinates
guginator.mood(args)

Computes Gug’s bedtime song based on the color of his eyes.

Parameters:

args (argparse.Namespace) – A Namespace object. args.right should be a str: the color of Gug’s right eye. args.left should be a str: the color of Gug’s left eye.

Returns:

The notes to play for Gug

Return type:

list of str

Raises: