For every good kata idea there seem to be quite a few bad ones!

In this kata you need to check the provided array (x) for good ideas 'good' and bad ideas 'bad'. If there are one or two good ideas, return 'Publish!', if there are more than 2 return 'I smell a series!'. If there are no good ideas, as is often the case, return 'Fail!'.

~~~if:c
For C: do not dynamically allocate memory,
      instead return a string literal
~~~

Difficulty: introductory

Starter code:

def well(x):
	

Solutions:
def well(x):
    c = x.count('good')
    return 'I smell a series!' if c > 2 else 'Publish!' if c else 'Fail!'

def well(x):
    if x.count("good") == 0:
        return "Fail!"
    elif x.count("good") <= 2:
        return "Publish!"
    else:
        return "I smell a series!"

def well(x):
    if 'good' in x:
        return 'I smell a series!' if x.count('good') > 2 else 'Publish!'
    else:
        return 'Fail!'

def well(x):
    good = x.count('good')
    print (good)
    if good == 0:
        return 'Fail!'
    elif good > 2:
        return 'I smell a series!'
    else:
        return 'Publish!'

def well(ideas):
    good_ideas = ideas.count('good')
    if good_ideas == 0:
        return 'Fail!'
    elif good_ideas < 3:
        return 'Publish!'
    return 'I smell a series!'

well = lambda x: ('Fail!','Publish!','I smell a series!')[('good' in x) + (x.count('good')>2)]

def well(x):
  good_ideas = x.count('good')
  if good_ideas == 0:
       return 'Fail!'
  elif good_ideas <= 2:
      return 'Publish!'
  else:
      return 'I smell a series!'

def well(x):
    results = ""
    good_count = x.count("good")
    if good_count == 0:
        results = "Fail!"
    elif good_count <= 2:
        results = "Publish!"
    else :
        results = "I smell a series!"
    return results

def well(a):c=a.count('good');return['Fail!','Publish!','I smell a series!'][(c>0)+(c>2)]

def well(x): return ['Fail!', 'Publish!', 'Publish!', 'I smell a series!'][min(3, x.count('good'))]


well=lambda a:["Fail!","Publish!","I smell a series!"][min((a.count("good")+1)//2,2)]


def well(x):
    y=0
    
    for c  in x:
        if c=="good":
            y=y+1
            
    if y==0:
        return 'Fail!'

    if y > 2:
        return 'I smell a series!'
        
        
    return 'Publish!'
    
   #  'Publish!', if there are more than 2 return 'I smell a series!'. If there are no good ideas, as is often the case, return 'Fail!'.


def well(x):
    if x.count('good') >= 3:
        return 'I smell a series!'
    elif x.count('good') >= 1:
        return 'Publish!'
    return 'Fail!'


def well(x):
    if x.count('good') > 2:
        return 'I smell a series!'
    if 'good' in x:
        return 'Publish!'
    return 'Fail!'

def well(x):
    return ("I smell a series!" if x.count("good") > 2
        else "Fail!" if x.count("good") < 1
        else "Publish!")

def well(ideas):
    good = 0
    
    for idea in ideas:
        if idea == 'good':
            if good > 1:
                return 'I smell a series!'
            good += 1
    
    return 'Publish!' if good else 'Fail!'

def well(x):
    return 'Publish!' if 1 <= x.count('good') <= 2 else 'I smell a series!' if x.count('good') > 2 else 'Fail!'

def well(x):
    return "I smell a series!" if x.count("good") > 2 else "Publish!" if x.count("good") >= 1 else "Fail!"

well=lambda x:'I smell a series!'if x.count('good')>2 else('Publish!'if x.count('good') else 'Fail!')

well = lambda x: ('Fail!','Publish!','I smell a series!')[min(int(x.count('good')/2+0.5),2)]

def well(x):
    count = x.count("good")
    if count <= 2 and count >= 1:
        return "Publish!"
    elif count > 2:
        return "I smell a series!"
    else:
        return "Fail!"
        


def well(x):
    goodIdeas=0
    for k in x:
        if(k=="good"):
            goodIdeas+=1
    if goodIdeas>2:
        return "I smell a series!"
    elif goodIdeas>=1:
        return "Publish!"
    else:
        return 'Fail!'


def well(x):
    n = x.count('good')
    return ('Fail!', 'Publish!', 'I smell a series!')[(n > 0) + (n > 2)]

def well(x):
    
    return 'Fail!' if x.count('good')==0 else 'Publish!' if x.count('good')<=2 else "I smell a series!"

def well(x):
    g=x.count('good')
    if g>2: return 'I smell a series!'
    if g: return 'Publish!'
    return 'Fail!'

def well(x):
    return {0: "Fail!", 1: "Publish!", 2: "Publish!"}.get(x.count("good"), "I smell a series!")

def well(x):
    chk = x.count('good')
    return['Fail!','Publish!','I smell a series!'][(chk > 0)+(chk > 2)]

def well(x):
    '''
    if x.count('good') > 2: 
        return 'I smell a series!'
    elif x.count('good') > 0 < 3: 
        return 'Publish!'
    else:
        return 'Fail!'
        '''
    chk, l = x.count('good'), ['Fail!','Publish!','I smell a series!']
    return [l[0],l[1],l[1]][chk] if chk < 3 else l[2]

def well(x):
    if x.count('good') <= 2 and x.count('good') > 0:
        return 'Publish!'
    elif x.count('good') > 0:
        return 'I smell a series!'
    else:
        return 'Fail!'


def well(x):
    goods = x.count('good')
    return ['Fail!', 'Publish!', 'I smell a series!'][(goods > 2) + (goods >= 1)]

def well(x):
    good_count = 0
    for i in x:
        if i == "good":
            good_count+=1
    
    if 0< good_count <=2 :
        return 'Publish!'
    if good_count == 0 :
        return 'Fail!'
    if good_count > 2:
        return 'I smell a series!'


def well(x):
    print(x)
    if 0 < x.count('good') <= 2: return 'Publish!'
    elif x.count('good') > 2: return 'I smell a series!'
    else: return 'Fail!'

def well(x):
    good_ideas = x.count('good')
    if not good_ideas: return 'Fail!'
    elif good_ideas <= 2: return 'Publish!'
    else: return 'I smell a series!'


def well(x):
    a = sum(1 for i in x if i == "good")
    if a == 1 or a == 2:
        return "Publish!"
    elif a > 2:
        return "I smell a series!"
    else:
        return "Fail!"

def well(x):
    # your code here
    NG=0
    for i in range(len(x)):
        if(x[i]=="good"):
            NG+=1    
    if(NG>2):
        return 'I smell a series!'
    elif(NG>=1):
        return 'Publish!'
    else:
        return 'Fail!'

def well(x):
    if x.count("bad") == len(x):
        return "Fail!"
    if x.count('good') == 1 or x.count('good') == 2:
        return "Publish!"
    else:
        return 'I smell a series!'

def well(x):
    count = 0
    for i in x:
        if i == 'good':
            count += 1
    if count > 2:
        return 'I smell a series!'
    elif count != 0:
        return 'Publish!'
    return 'Fail!'


def well(x):
    if not('good' in x):
        return 'Fail!'
    else:
        return 'Publish!' if x.count('good') < 3 else 'I smell a series!' 

def well(x):
    counter = 0
    for i in x:
        if i.lower() == 'good':
            counter +=1
    if counter == 1 or counter == 2:
        return "Publish!"
    elif counter>2:
        return "I smell a series!"
    elif counter<1: 
        return "Fail!"

def well(x):
    
    c= x.count("good")
    if c < 1:
        return "Fail!"
    elif 1 <= c <=2 :
        return "Publish!"
    else:
        return "I smell a series!"
        


def well(x):
    good_idea_num = x.count('good')
    if good_idea_num < 1:
        return 'Fail!'
    elif good_idea_num < 3:
        return 'Publish!'
    else:
        return 'I smell a series!'

def well(x):
    v = len([i for i in x if i == 'good'])
    return 'Fail!' if v == 0 else 'I smell a series!' if v > 2 else 'Publish!'

def well(x):
    num_good = x.count("good")
    if num_good == 0:
        return "Fail!"
    elif num_good > 2:
        return "I smell a series!"
    return "Publish!"

def well(x):
    temp = x.count("good")
    if 0 < temp < 3:
        return 'Publish!'
    elif temp > 2:
        return 'I smell a series!'
    else:
        return 'Fail!'

def well(x):
    return "I smell a series!" if sum(1 if i == "good" else 0 for i in x) > 2 else "Publish!" if 3 > sum(1 if i == "good" else 0 for i in x) > 0 else "Fail!"

def well(x):
    c = x.count('good')
    return 'Publish!' if c == 1 or c == 2 else 'I smell a series!' if c > 2 else 'Fail!'

def well(x):
    return 'I smell a series!' if x.count('good') > 2 else 'Publish!' if x.count('good') != 0 else 'Fail!'

def well(x):
    c=0
    for i in x:
        if i == 'good':
            c+=1
        
    if c==1 or c==2:
        return 'Publish!'
    elif c >2:
        return 'I smell a series!'
    elif c==0:
        return 'Fail!'

def well(x):
    alfa = ('Fail!', 'Publish!', 'Publish!', 'I smell a series!')
    return alfa[min(3, max(x.count('good'), 0))]

def well(x):
    goodCount = 0
    for item in x:
        if item == "good":
            goodCount += 1
            
    if goodCount > 2:
        return "I smell a series!"
    elif goodCount > 0:
        return "Publish!"
    else:
        return "Fail!"

def well(x):
    a = 0
    for i in x:
        if i.lower() == 'good':
            a += 1
    if a <= 2 and a != 0:
        return 'Publish!'
    elif a > 2:
        return 'I smell a series!'
    else:
        return 'Fail!'

def well(x):
    c = x.count('good')
    return ('Publish!' if c <= 2 else 'I smell a series!') if c>0 else 'Fail!'

def well(x):
    c = len([i for i in x if i == 'good'])
    if c == 0:
        return 'Fail!'
    elif c < 3:
        return 'Publish!'
    else:
        return 'I smell a series!'

def well(x):
    y = x.count("good") 
    if y == 0:
        return "Fail!"
    elif y ==1 or y==2:
        return "Publish!"
    else:
        return "I smell a series!"

def well(x):
    cnt=x.count('good')
    return "Fail!" if cnt==0 else "Publish!" if cnt < 3 else "I smell a series!"

def well(x):
    # your code here
    c=0
    for i in x:
        if(i=="good"):
            c+=1
    if(0<c<=2):
        return "Publish!"
    elif(c>2):
        return "I smell a series!"
    else:
        return "Fail!"


def well(x):
    counter = 0
    for idea in x:
        if idea == 'good':
            counter += 1
    if counter == 0:
        return 'Fail!'
    elif counter <= 2:
        return 'Publish!'
    else:
        return 'I smell a series!'

def well(x):
    if "good" in x: return "I smell a series!" if x.count("good") > 2 else "Publish!"
    return "Fail!"

def well(x):
    i = x.count("good")
    if i > 2:
        return "I smell a series!"
    elif i == 0:
        return "Fail!"
    else:
        return "Publish!"

def well(x):

    return 'Publish!' if x.count('good') in [1,2] else 'I smell a series!' if x.count('good') > 2 else 'Fail!'

def well(x):
    n = x.count('good')
    return 'Fail!' if n < 1 else 'Publish!' if n < 3 else 'I smell a series!'

def well(x):
    counter = 0 
    for i in x:
        if i == "good":
            counter += 1
    if counter < 1:
        return "Fail!" 
    elif counter <= 2:
        return "Publish!"
    elif counter >2:
        return "I smell a series!"

def well(x):
    score = 0
    for count in range(len(x)):
        if x[count] == "good":
            score += 1
        else:
            continue
    if score > 0 and score < 3:
        return "Publish!"
    elif score > 2: 
        return "I smell a series!"
    else:
        return "Fail!"
    


def well(x):
    # your code here
    return 'Publish!' if x.count('good')==2 or x.count('good')==1 else  'I smell a series!' if x.count('good')>2 else 'Fail!'

def well(x):
    good_count = x.count('good')
    return 'I smell a series!' if good_count > 2 else ('Publish!' if good_count else 'Fail!')

def well(x):
    good_ideas = 0
    
    for idea in x:
        if idea == "good":
            good_ideas +=1 
        
    if 0 < good_ideas <=2: 
        return "Publish!"
    elif 2 < good_ideas: 
        return "I smell a series!"
    else:
        return "Fail!"


def well(x):
    d = {i:x.count(i) for i in x}
    if not d.get('good'):
        return 'Fail!'
    elif 1 <= d.get('good') <=2:
        return 'Publish!'
    else:
        return 'I smell a series!'

def well(x):
    l=x.count('good')
    return 'I smell a series!' if l>2 else 'Publish!' if l>0 else 'Fail!'

def well(x):
    if x.count('good') == 0: return "Fail!"
    return 'Publish!' if x.count('good') == 1 or x.count('good') == 2 else "I smell a series!"

def well(x):
    return ["Fail!","Publish!","Publish!","I smell a series!"][x.count("good") if x.count("good") < 3 else 3]

def well(x):
    y="good"
    count=0
    cw=0
    while len(x) > cw:
        if x[cw] == y:
            count=count+1
            cw=cw+1
        else:
            cw=cw+1
    if count == 1 or count == 2:
        return "Publish!"
    elif count > 2:
        return "I smell a series!"
    else:
        return "Fail!"

def well(x):
    g = sum([1 for item in x if item == 'good'])
    if g > 2: return 'I smell a series!'
    elif g > 0: return 'Publish!'
    else: return 'Fail!'

def well(x):
    
    if x.count("good") in [1,2]:
        return "Publish!"
    elif x.count("good") == 0:
        return "Fail!"
    elif len(x) > 2:
        return "I smell a series!"
    else:
        return "?"


def well(x):
    cnt = 0
    for idea in x:
        cnt += 1 if idea == 'good' else 0
    return 'Fail!' if cnt == 0 else 'Publish!' if cnt <=2 else 'I smell a series!'

def well(x):
    c = x.count('good')
    if 2 >= c >= 1:
        return 'Publish!'
    if c > 2:
        return 'I smell a series!'
    return 'Fail!'

def well(x):
    """(^-__-^)"""
    if x.count('good') > 2: return 'I smell a series!'
    if x.count('good') == 0: return 'Fail!'
    if 3 > x.count('good') >= 1  : return 'Publish!'

def well(x):
    return 'Publish!' if 1 <= x.count('good') <= 2 else 'I smell a series!' if \
        x.count('good') > 2 else 'Fail!'

def well(x):
    if 'good' not in x:
        return 'Fail!'
    good = 0
    for i in x:
        if i == 'good':
            good += 1
    if good > 2:
        return 'I smell a series!'
    return 'Publish!'

def well(x):
    res = ""
    if x.count("good") == 1 or x.count("good") == 2:
        res = "Publish!"
    elif x.count("good") > 2:
        res = "I smell a series!"
    else:
        res = "Fail!"
    return res

def well(x):
    count_ = x.count('good')
    return 'Fail!' if count_ == 0 else ('Publish!' if count_ <= 2 else ('I smell a series!'))


def well(x):
    good_count = 0
    for idea in x:
        if idea == 'good':
            good_count += 1
    if good_count == 0:
        return 'Fail!'
    elif good_count < 3:
        return 'Publish!'
    else:
        return 'I smell a series!'

def well(x):
    c = x.count('good')
    a = ''
    if c == 0:
        a = 'Fail!'
    elif c < 3:
        a = 'Publish!'
    else:
        a = 'I smell a series!'
    return a

def well(x):
    k = 0
    for i in x:
        if i == "good":
            k += 1
    if k == 0:
        return 'Fail!'
    if k == 1 or k == 2:
        return 'Publish!'
    if k > 2:
        return 'I smell a series!'

def well(x):
    a = x.count('good')
    if 1 <= a <= 2:
        return 'Publish!'
    if 3 <= a:
        return 'I smell a series!'
    else: 
        return 'Fail!'

def well(x):
    count = x.count('good')
    
    return 'Fail!' if count == 0 else 'Publish!' if count <= 2 else 'I smell a series!'

def well(x):
    count = 0
    
    for idea in x:
        if idea == 'good': count += 1
    
    return 'Fail!' if count == 0 else 'Publish!' if count <= 2 else 'I smell a series!'

def well(x):
    y = x.count('good')
    if y is 0:
        return "Fail!"
    if y == 1 or y ==2:
        return "Publish!"
    return 'I smell a series!'

def well(x):
    good_ideas = sum(1 for word in x if word == "good")
    if good_ideas > 2:
        return "I smell a series!"
    elif good_ideas > 0:
        return "Publish!"
    return "Fail!"

def well(x):
    c = x.count('good')
    if 0 < c <= 2:
        return 'Publish!'
    elif c > 2:
        return 'I smell a series!'
    else:
        return 'Fail!'

def well(x):
    res = 0
    for i in x:
        if i == 'good': res += 1
    if res <= 2 and res > 0: return 'Publish!'
    elif res > 2: return 'I smell a series!'
    else: return 'Fail!'

def well(x):    
    good = x.count('good')
    if good> 2:
        return 'I smell a series!'
    elif good == 0:
        return 'Fail!'
    else:
        return 'Publish!'

def well(x):
    good_counter = 0
    for i in x:
        if i == 'good':
            good_counter += 1
    if 1<=good_counter<=2:
        return 'Publish!'
    elif good_counter>2:
        return 'I smell a series!'
    else:
        return 'Fail!'

def well(x):
    count_good = x.count('good')
    if count_good > 0  and count_good <= 2:
        return 'Publish!'
    elif count_good > 2:
        return 'I smell a series!'
    return 'Fail!'

def well(x):
    count_good = x.count('good')
    if count_good ==1 or count_good ==2 :
        return 'Publish!'
    elif count_good > 2:
        return 'I smell a series!'
    else:
        return 'Fail!'

def well(x):
    return ['Fail!', 'Publish!', 'Publish!', 'I smell a series!', 'I smell a series!', 'I smell a series!', 'I smell a series!'].__getitem__(x.count('good'))

def well(x):
    for i in x:
        if x.count('good') >= 3:
            return 'I smell a series!'
        elif 0 < x.count('good') <= 2:
            return 'Publish!'
        elif x.count:
            return 'Fail!'


def well(x):
    goodCounter = 0
    for i in range(len(x)): 
        if x[i] == 'good': 
            goodCounter += 1 
    if goodCounter == 1 or goodCounter ==2 : return 'Publish!'
    elif goodCounter > 2: return 'I smell a series!'
    
    return 'Fail!'

def well(x):
    if str(x.count('good')) in '12':
        return 'Publish!'
    elif x.count('good') > 2:
        return 'I smell a series!'
    else:
        return 'Fail!'

def well(x):
    y =  x.count('good')
    if 2 >= y >= 1:
        return 'Publish!'
    elif y >= 3 :
        return  'I smell a series!'
    if y == 0:
        return 'Fail!'

def well(x):
    if not 'good' in x:
        return 'Fail!'
    else:
        if len([i for i in x if i=="good"])>2:
            return 'I smell a series!'
        else:
            return 'Publish!'

def well(x):
    # your code here
    if 'good' not in x:
        return 'Fail!'
    elif 3>x.count('good')>0:
        return 'Publish!'
    else:
        return 'I smell a series!'

def well(x):
    pos = x.count('good')
    if pos == 1 or pos == 2:
        return 'Publish!'
    elif pos > 2:
        return 'I smell a series!'
    else:
        return 'Fail!'