This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Python

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agent selector:
You are given following data for agents:
Agent
.is_available
.available_since(time since the agent is available)
.roles(a list of roles that the user has eg:Spanish speaker, sales,export etc.,)
   *When an issue comes in we need to present the issue to 1 or any agent based on agent selection mode can be all available least busy or random.In "all available mode" the issue is presented to all agents so they pick the issue if they want.In least busy the issue is presented to the agent that has been available for the longest.In random mode we randomly pick an agent.An issue has many roles(sales, export.,) the issue is presented to the only with matched roles.
Please write a function the takes input of list of agents with their data,agent selection mode and returns a list of agents the issue should be presented to...
 
Marshal
Posts: 69782
277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

We don't give out complete solutions, but please tell us how far we have got and we shall try and help you.
 
Sheriff
Posts: 7646
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch again

Sounds like a homework. As CR said, spend some time providing an evidence you already putted an effort in it, as this exercise seems to be for the purpose so you'd learn something.
 
And inside of my fortune cookie was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic