Every now and then people in the office moves teams or departments. Depending what people are doing with their time they can become more or less boring. Time to assess the current team.

```if-not:java
You will be provided with an object(staff) containing the staff names as keys, and the department they work in as values.
```

```if:java
You will be provided with an array of `Person` objects with each instance containing the name and department for a staff member.
~~~java
public class Person {
  public final String name;        // name of the staff member
  public final String department;  // department they work in
}
~~~
```

Each department has a different boredom assessment score, as follows:

accounts = 1
finance = 2 
canteen = 10 
regulation = 3 
trading = 6 
change = 6
IS = 8
retail = 5 
cleaning = 4
pissing about = 25

Depending on the cumulative score of the team, return the appropriate sentiment:

<=80: 'kill me now'
< 100 & > 80: 'i can handle this'
100 or over: 'party time!!'

The Office I - Outed
The Office III - Broken Photocopier
The Office IV - Find a Meeting Room
The Office V - Find a Chair

Difficulty: introductory

Starter code:

def boredom(staff):
	

Solutions:
def boredom(staff):
    lookup = {
        "accounts": 1,
        "finance": 2,
        "canteen": 10,
        "regulation": 3, 
        "trading": 6,
        "change": 6,
        "IS": 8,
        "retail": 5,
        "cleaning": 4,
        "pissing about": 25
    }
    n = sum(lookup[s] for s in staff.values())
    if n <= 80:
        return "kill me now"
    if n < 100:
        return "i can handle this"
    return "party time!!"

boredom_scores = {
    'accounts': 1,
    'finance': 2 ,
    'canteen': 10 ,
    'regulation': 3 ,
    'trading': 6 ,
    'change': 6,
    'IS': 8,
    'retail': 5,
    'cleaning': 4,
    'pissing about': 25,
}

def boredom(staff):
    score = sum(map(boredom_scores.get, staff.values()))
    return (
        'kill me now' if score <= 80 else
        'i can handle this' if score < 100 else
        'party time!!'
    )

scores = {
    "accounts": 1, "finance": 2, "canteen": 10, "regulation": 3, "trading": 6,
    "change": 6, "IS": 8, "retail": 5, "cleaning": 4, "pissing about": 25
}

def boredom(staff):
    score = sum(scores[activity] for activity in staff.values())
    return "party time!!" if score >= 100 else "i can handle this" if score > 80 else "kill me now"

SCORE={"accounts": 1, "finance" : 2, "canteen" : 10, "regulation" : 3, "trading" : 6, 
       "change" : 6, "IS" : 8, "retail" : 5, "cleaning" : 4, "pissing about" : 25}
       
def boredom(staff):
  score = sum(map(lambda x: SCORE[x], staff.values()))
  return ("kill me now", "i can handle this", "party time!!")[(score>=100) + (score>80)]

def boredom(staff):
    departments = {'accounts': 1, 'finance': 2, 'canteen': 10, 'regulation': 3, 'trading': 6, 'change': 6, 'IS': 8, 'retail': 5, 'cleaning': 4, 'pissing about': 25}
    score = sum(departments[x] for x in staff.values())
    return 'kill me now' if score <= 80 else 'party time!!' if score > 100 else 'i can handle this'

def boredom(staff):
    dict_ = {'accounts': 1,
'finance':2,
'canteen':10,
'regulation':3,
'trading':6,
'change':6,
'IS':8,
'retail':5,
'cleaning':4,
'pissing about':25}
    summ = sum(dict_[i] for i in staff.values())
    return  "kill me now" if summ<=80 else 'i can handle this' if 100>summ>80 else "party time!!"

def boredom(staff):
    scores = {"accounts" : 1, "finance" : 2, "canteen" : 10,
              "regulation" : 3, "trading" : 6, "change" : 6,
              "IS" : 8, "retail" : 5, "cleaning" : 4, "pissing about" : 25}
    score = sum(scores[team] for team in staff.values())
    return "kill me now" if score <= 80 else "party time!!" if score >= 100 else "i can handle this"

boredom=lambda s:['kill me now','i can handle this','party time!!'][min(2,max(0,__import__('math').ceil(sum((' tconig I e'+' '*14+'u').index(e.replace('din','g')[-2])for e in s.values())/20-4)))]

def boredom(staff):
    D = {   'accounts': 1,
            'finance': 2,
            'canteen': 10,
            'regulation': 3,
            'trading': 6,
            'change': 6,
            'IS': 8,
            'retail': 5,
            'cleaning': 4,
            'pissing about': 25,
            }
    score = sum ( [D[key] for key in list(staff.values())] )
    if         score <= 80:  ans = 'kill me now'
    elif  80 < score <  100: ans = 'i can handle this'
    elif       score >= 100: ans = 'party time!!'
    return ans


def boredom(staff):
    depts = {"accounts": 1, "finance": 2, "canteen": 10, "regulation": 3, "trading":
             6, "change": 6, "IS": 8, "retail": 5, "cleaning": 4, "pissing about": 25}
    b = sum(depts[v] for v in staff.values())
    return 'kill me now' if b <= 80 else 'i can handle this' if b < 100 else 'party time!!'